From patchwork Thu Oct 16 19:40:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 5094001 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 7B73F9F30B for ; Thu, 16 Oct 2014 19:40:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0220201EF for ; Thu, 16 Oct 2014 19:40:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9B45201F4 for ; Thu, 16 Oct 2014 19:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752708AbaJPTka (ORCPT ); Thu, 16 Oct 2014 15:40:30 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:37466 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887AbaJPTk1 (ORCPT ); Thu, 16 Oct 2014 15:40:27 -0400 Received: by mail-ig0-f181.google.com with SMTP id r10so255688igi.14 for ; Thu, 16 Oct 2014 12:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=SXEWCKsUTclakXAi8HhEfzdBfGmW97QJig+2u2f22Gg=; b=0VDNyYsJm0eM9q3wTOLw5VzDOhlo/kNpQBmHbI26L/BStgv4e6Wr5Nlrh3NCw7O6X0 Sv5O0b777kCWXhFAN2P2aUq8fcuUyIfm95Ml6l4MBHvps4hipPXQaHjWZPHbzvldLqix 34Aa3vz4ANHaWLY6W+YcqY0SoTS9JUmyyV7QMOT8ErWiq2EwCMDrPJYtJeVndPC4/qHS WWHdJ0v1Jwzzwayc2BXFsd76SoWMzwCh+6aqpTPL7MaZiyJtVHqRh97WzDY+yesFNFbq ngV2QD9haOpOizXgXqMHJutktO0rmvOcXyi7nUGenR4pq/tnIMGr9k6Auf5rjXB3bjkr CTUA== X-Received: by 10.107.36.141 with SMTP id k135mr4235593iok.14.1413488426884; Thu, 16 Oct 2014 12:40:26 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by mx.google.com with ESMTPSA id y64sm3296730iod.0.2014.10.16.12.40.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Oct 2014 12:40:26 -0700 (PDT) Subject: [PATCH v1 16/16] NFS: Disable SESSION4_BACK_CHAN when a backchannel sidecar is to be used From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Thu, 16 Oct 2014 15:40:24 -0400 Message-ID: <20141016194024.13414.22106.stgit@manet.1015granger.net> In-Reply-To: <20141016192919.13414.3151.stgit@manet.1015granger.net> References: <20141016192919.13414.3151.stgit@manet.1015granger.net> User-Agent: StGit/0.17.1-3-g7d0f MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 A CREATE_SESSION operation with SESSION4_BACK_CHAN cleared is sent to force the server to report SEQ4_STATUS_CB_PATH_DOWN. The client recovers by setting up a sidecar backchannel connection. Signed-off-by: Chuck Lever --- fs/nfs/nfs4proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 2eaf7ec..e0bcc30 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -7187,6 +7187,7 @@ static int _nfs4_proc_create_session(struct nfs_client *clp, struct nfs41_create_session_args args = { .client = clp, .cb_program = NFS4_CALLBACK, + .flags = SESSION4_PERSIST, }; struct nfs41_create_session_res res = { .client = clp, @@ -7200,7 +7201,8 @@ static int _nfs4_proc_create_session(struct nfs_client *clp, int status; nfs4_init_channel_attrs(&args); - args.flags = (SESSION4_PERSIST | SESSION4_BACK_CHAN); + if (!clp->cl_bc_rpcclient) + args.flags |= SESSION4_BACK_CHAN; status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); trace_nfs4_create_session(clp, status);