aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-02-21 16:17:43 -0500
committerSteve French <sfrench@us.ibm.com>2009-03-11 21:36:20 -0400
commitb298f223559e0205244f553ceef8c7df3674da74 (patch)
treea65cb2f64d1b999b7b573857a8b33bbb83ff97af /fs/cifs/cifsproto.h
parentebdcc81c71937b30e09110c02a1e8a21fa770b6f (diff)
[CIFS] Send SMB flush in cifs_fsync
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 to restore the fsync-behavior of smbfs by triggering SMB_COM_FLUSH after sending outstanding data on the client side to the server. Signed-off-by: Horst Reiterer <horst.reiterer@gmail.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 083dfc57c7a3..596fc8689371 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -281,6 +281,9 @@ extern int CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon,
281extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, 281extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon,
282 const int smb_file_id); 282 const int smb_file_id);
283 283
284extern int CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon,
285 const int smb_file_id);
286
284extern int CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, 287extern int CIFSSMBRead(const int xid, struct cifsTconInfo *tcon,
285 const int netfid, unsigned int count, 288 const int netfid, unsigned int count,
286 const __u64 lseek, unsigned int *nbytes, char **buf, 289 const __u64 lseek, unsigned int *nbytes, char **buf,