From patchwork Tue Jun 25 18:37:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 2778681 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B916C0AB1 for ; Tue, 25 Jun 2013 18:37:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BAA5203E9 for ; Tue, 25 Jun 2013 18:37:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C1D1203E3 for ; Tue, 25 Jun 2013 18:37:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250Ab3FYSho (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 S1752005Ab3FYShm (ORCPT ); Tue, 25 Jun 2013 14:37:42 -0400 X-IronPort-AV: E=Sophos;i="4.87,938,1363158000"; d="scan'208";a="68725425" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx12-out.netapp.com with ESMTP; 25 Jun 2013 11:37:42 -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 r5PIbfYO006831; Tue, 25 Jun 2013 11:37:42 -0700 (PDT) From: andros@netapp.com To: trond.myklebust@netapp.com Cc: linux-nfs@vger.kernel.org, Andy Adamson Subject: [PATCH 2/3] NFSv4.1 Do not overwrite negotiated session sizes Date: Tue, 25 Jun 2013 14:37:33 -0400 Message-Id: <1372185454-1888-2-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1372185454-1888-1-git-send-email-andros@netapp.com> References: <1372185454-1888-1-git-send-email-andros@netapp.com> 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 nfs4_init_session is called after CREATE_SESSION has set the ca_maxrequestsize and ca_maxresponsesize values obtained from the server. Signed-off-by: Andy Adamson --- fs/nfs/nfs4session.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c index c4e225e..7ac14cc 100644 --- a/fs/nfs/nfs4session.c +++ b/fs/nfs/nfs4session.c @@ -499,13 +499,11 @@ int nfs4_init_session(struct nfs_server *server) session = clp->cl_session; spin_lock(&clp->cl_lock); if (test_and_clear_bit(NFS4_SESSION_INITING, &session->session_state)) { - /* Initialise targets and channel attributes */ + /* Initialise targets */ session->fc_target_max_rqst_sz = target_max_rqst_sz; - session->fc_attrs.max_rqst_sz = target_max_rqst_sz; session->fc_target_max_resp_sz = target_max_resp_sz; - session->fc_attrs.max_resp_sz = target_max_resp_sz; } else { - /* Just adjust the targets */ + /* Adjust the targets and perhaps reset the session */ if (target_max_rqst_sz > session->fc_target_max_rqst_sz) { session->fc_target_max_rqst_sz = target_max_rqst_sz; set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state);