[linux-cifs-client] [PATCH] cifs: make cifs_writepages use longer timeout

Jeff Layton jlayton at redhat.com
Thu Apr 2 15:32:00 GMT 2009


We've had a lot of changes to the socket sending and buffered write code
in recent months and I've just noticed some breakage due to it. The
"bigfile2" connectathon test does writes at 2G and 4G offsets in a file.
When running this test against a windows server, this is timing out
after 45s and throwing a -EAGAIN error back to userspace.

The following patch "fixes" it, but I'm not entirely thrilled with it.
It would be nice to detect that we are writing past the EOF and only
increase the timeout in that situation. The problem is that by the time
we're writing back pages i_size has already been updated.

Signed-off-by: Jeff Layton <jlayton at redhat.com>
---
 fs/cifs/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 81747ac..e86e7b5 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1532,7 +1532,7 @@ retry:
 						   open_file->netfid,
 						   bytes_to_write, offset,
 						   &bytes_written, iov, n_iov,
-						   CIFS_LONG_OP);
+						   CIFS_VLONG_OP);
 				atomic_dec(&open_file->wrtPending);
 				if (rc || bytes_written < bytes_to_write) {
 					cERROR(1, ("Write2 ret %d, wrote %d",
-- 
1.5.5.6



More information about the linux-cifs-client mailing list