Mailing List Archive

Git patch for ocf:heartbeat:FIlesystem
Hi,

Monitor operation goes into loop due to improper flag (O_DIRECT) passed
to dd when creating the testfile with OCF_CHECK_LEVEL=20 on cifs/smbfs
mounts.

This fixes it.

Regards,
Dan

--
Dan Frincu
CCNA,RHCE

1&1 Internet Development S.R.L. - Bucharest/Romania - Linux Development Romania
18 Mircea Eliade St
Sect 1, Bucharest
RO Bucharest, 012015
dan.frincu@1and1.ro
Re: Git patch for ocf:heartbeat:FIlesystem [ In reply to ]
Ok, not the right patch attached the first time, this is the proper one.

Regards,
Dan

On 07/12/2011 07:19 PM, Dan Frincu wrote:
> Hi,
>
> Monitor operation goes into loop due to improper flag (O_DIRECT) passed
> to dd when creating the testfile with OCF_CHECK_LEVEL=20 on cifs/smbfs
> mounts.
>
> This fixes it.
>
> Regards,
> Dan
>
Re: Git patch for ocf:heartbeat:FIlesystem [ In reply to ]
Hi Dan,

On Tue, Jul 12, 2011 at 07:35:47PM +0300, Dan Frincu wrote:
> Ok, not the right patch attached the first time, this is the proper one.

Many thanks for the patch. I applied a slightly modified
version, i.e. prevent using direct for all instances which
don't live on block device.

Cheers,

Dejan

> Regards,
> Dan
>
> On 07/12/2011 07:19 PM, Dan Frincu wrote:
>> Hi,
>>
>> Monitor operation goes into loop due to improper flag (O_DIRECT) passed
>> to dd when creating the testfile with OCF_CHECK_LEVEL=20 on cifs/smbfs
>> mounts.
>>
>> This fixes it.
>>
>> Regards,
>> Dan
>>

> diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
> index 05a0ad7..7295ed2 100755
> --- a/heartbeat/Filesystem
> +++ b/heartbeat/Filesystem
> @@ -844,9 +844,14 @@ Filesystem_monitor_10()
> #
> Filesystem_monitor_20()
> {
> - # Writing to the device in O_DIRECT mode is imperative
> - # to bypass caches.
> - dd_opts="oflag=direct,sync bs=512 conv=fsync,sync"
> + if [ "$FSTYPE" = "cifs" ] || [ "$FSTYPE" = "smbfs" ]; then
> + # O_DIRECT not supported on cifs/smbfs
> + dd_opts="oflag=sync bs=512 conv=fsync,sync"
> + else
> + # Writing to the device in O_DIRECT mode is imperative
> + # to bypass caches.
> + dd_opts="oflag=direct,sync bs=512 conv=fsync,sync"
> + fi
> status_dir=`dirname $STATUSFILE`
> [ -d "$status_dir" ] ||
> mkdir -p "$status_dir"

> _______________________________________________
> ha-wg-technical mailing list
> ha-wg-technical@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical

_______________________________________________
ha-wg-technical mailing list
ha-wg-technical@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical