[linux-cifs-client] Re: [PATCH] fs/cifs: send SMB_COM_FLUSH in cifs_fsync

Steve French smfrench at gmail.com
Sat Feb 21 01:21:05 GMT 2009


On Fri, Feb 20, 2009 at 2:51 PM, Horst Reiterer
<horst.reiterer at gmail.com> wrote:
> Hi,
>
> In contrast to the now-obsolete smbfs, cifs does not send SMB_COM_FLUSH
> in response to an explicit fsync(2) to guarantee that all volatile data
> is written to stable storage on the server side, provided the server
> honors the request (which, to my knowledge, is true for Windows and
> Samba with 'strict sync' enabled).
> This patch modifies the cifs_fsync implementation

I modified your patch slightly to not lose the writeback rc in one
case, and to change camel case pTcon to tcon and remove one
unnecessary local variable.

See attached.   Thanks for the submission - looks fine otherwise.   If
you have any performance numbers before and after (with e.g. dbench,
iozone, bonnie etc. or perhaps something which calls fsync more often
- that would be helpful in determining whether we need a mount option
to optionally disable it - as the samba server does)


-- 
Thanks,

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fsync.patch
Type: text/x-diff
Size: 4793 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20090220/967864c9/fsync.bin


More information about the linux-cifs-client mailing list