
dejan at suse
Aug 16, 2011, 8:21 AM
Post #3 of 3
(675 views)
Permalink
|
|
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 [at] lists > https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical _______________________________________________ ha-wg-technical mailing list ha-wg-technical [at] lists https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
|