diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-04-03 21:44:00 +0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-04-17 05:26:49 +0400 |
commit | fbec9ab952d4810960e620035c8e95f0fbbae4be (patch) | |
tree | e4d8ef8e0fbe2703d98390d96151cbf40d32f434 /fs/cifs/cifsfs.c | |
parent | d036f50fc202e1a851a25dc5edc215ebd0086201 (diff) | |
download | linux-fbec9ab952d4810960e620035c8e95f0fbbae4be.tar.xz |
cifs: vary timeout on writes past EOF based on offset (try #5)
This is the fourth version of this patch:
The first three generated a compiler warning asking for explicit curly
braces.
The first two didn't handle update the size correctly when writes that
didn't start at the eof were done.
The first patch also didn't update the size correctly when it explicitly
set via truncate().
This patch adds code to track the client's current understanding of the
size of the file on the server separate from the i_size, and then to use
this info to semi-intelligently set the timeout for writes past the EOF.
This helps prevent timeouts when trying to write large, sparse files on
windows servers.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 38491fd3871d..34f5701d9555 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -316,6 +316,7 @@ cifs_alloc_inode(struct super_block *sb) cifs_inode->clientCanCacheAll = false; cifs_inode->delete_pending = false; cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ + cifs_inode->server_eof = 0; /* Can not set i_flags here - they get immediately overwritten to zero by the VFS */ |