From patchwork Tue Jun 25 18:37:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 2778671 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 653D59F245 for ; Tue, 25 Jun 2013 18:37:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D32A203E6 for ; Tue, 25 Jun 2013 18:37:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 317B9203DF for ; Tue, 25 Jun 2013 18:37:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752005Ab3FYSho (ORCPT ); Tue, 25 Jun 2013 14:37:44 -0400 Received: from mx12.netapp.com ([216.240.18.77]:51809 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752955Ab3FYShm (ORCPT ); Tue, 25 Jun 2013 14:37:42 -0400 X-IronPort-AV: E=Sophos;i="4.87,938,1363158000"; d="scan'208";a="68725419" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx12-out.netapp.com with ESMTP; 25 Jun 2013 11:37:41 -0700 Received: from fc17-1.androsad.fake (vpn2ntap-406100.vpn.netapp.com [10.55.67.18]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r5PIbfYN006831; Tue, 25 Jun 2013 11:37:41 -0700 (PDT) From: andros@netapp.com To: trond.myklebust@netapp.com Cc: linux-nfs@vger.kernel.org, Andy Adamson Subject: [PATCH 1/3] NFSv4.1 Add the RPC header and other overhead to session parameters request Date: Tue, 25 Jun 2013 14:37:32 -0400 Message-Id: <1372185454-1888-1-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andy Adamson ca_maxresponsesize and ca_maxrequestsize include the RPC header. Add the RPC header size and other xdr overhead in order to request NFS_MAX_FILE_IO_SIZE of read and write data. Signed-off-by: Andy Adamson --- fs/nfs/nfs4proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 3e40876..b569feb 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6189,9 +6189,9 @@ static void nfs4_init_channel_attrs(struct nfs41_create_session_args *args) mxresp_sz = session->fc_target_max_resp_sz; if (mxrqst_sz == 0) - mxrqst_sz = NFS_MAX_FILE_IO_SIZE; + mxrqst_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxwrite_overhead; if (mxresp_sz == 0) - mxresp_sz = NFS_MAX_FILE_IO_SIZE; + mxresp_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxread_overhead; /* Fore channel attributes */ args->fc_attrs.max_rqst_sz = mxrqst_sz; args->fc_attrs.max_resp_sz = mxresp_sz;