From patchwork Thu Apr 2 15:32:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 15952 Received: from lists.samba.org (mail.samba.org [66.70.73.150]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n32FWW6h028542 for ; Thu, 2 Apr 2009 15:32:32 GMT Received: from dp.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 0AAB8163CA2 for ; Thu, 2 Apr 2009 15:32:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on dp.samba.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.8 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.1.7 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by lists.samba.org (Postfix) with ESMTP id 0E8D0163AA1 for ; Thu, 2 Apr 2009 15:31:46 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n32FW274020677; Thu, 2 Apr 2009 11:32:02 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n32FW2jc001384; Thu, 2 Apr 2009 11:32:03 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [10.11.228.66]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n32FW1so010733; Thu, 2 Apr 2009 11:32:02 -0400 Received: from dantu.rdu.redhat.com ([127.0.0.1]) by dantu.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n32FW0vJ023554; Thu, 2 Apr 2009 11:32:00 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.13.8/8.13.8/Submit) id n32FW0o3023553; Thu, 2 Apr 2009 11:32:00 -0400 From: Jeff Layton To: linux-cifs-client@lists.samba.org Date: Thu, 2 Apr 2009 11:32:00 -0400 Message-Id: <1238686320-23533-1-git-send-email-jlayton@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: smfrench@gmail.com Subject: [linux-cifs-client] [PATCH] cifs: make cifs_writepages use longer timeout X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces+patchwork-cifs-client=patchwork.kernel.org@lists.samba.org Errors-To: linux-cifs-client-bounces+patchwork-cifs-client=patchwork.kernel.org@lists.samba.org 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 --- 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",