From patchwork Wed Mar 15 15:18:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 9625915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7BCE60424 for ; Wed, 15 Mar 2017 15:21:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAA7D28635 for ; Wed, 15 Mar 2017 15:21:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF79D28639; Wed, 15 Mar 2017 15:21:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2EA92863E for ; Wed, 15 Mar 2017 15:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbdCOPTP (ORCPT ); Wed, 15 Mar 2017 11:19:15 -0400 Received: from mx142.netapp.com ([216.240.21.19]:50430 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959AbdCOPTA (ORCPT ); Wed, 15 Mar 2017 11:19:00 -0400 X-IronPort-AV: E=Sophos;i="5.36,169,1486454400"; d="scan'208";a="176948020" Received: from vmwexchts03-prd.hq.netapp.com ([10.122.105.31]) by mx142-out.netapp.com with ESMTP; 15 Mar 2017 08:08:45 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCHTS03-PRD.hq.netapp.com (10.122.105.31) with Microsoft SMTP Server id 15.0.1210.3; Wed, 15 Mar 2017 08:18:55 -0700 Received: from fc25-3.androsad.fake (dros-16.vpn.netapp.com [10.55.67.174]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id v2FFIvaN006897; Wed, 15 Mar 2017 08:18:57 -0700 (PDT) From: To: , CC: Andy Adamson Subject: [PATCH Version 1 1/1] NFS free the layoutget slot before calling pnfs_layout_process Date: Wed, 15 Mar 2017 11:18:51 -0400 Message-ID: <20170315151851.5762-1-andros@netapp.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andy Adamson Otherwise no slots could be available for the potential pnfs_layout_process getdeviceinfo call and the client hangs on pNFS I/O. This occurs in testing against the pynfs pNFS server where the the on-wire reply highest_slotid and slot id are zero, and the target high slot id is 8 (negotiated in CREATE_SESSION). The internal fore channel slot table max_slotid, the maximum allowed table slotid value, has been reduced via nfs41_set_max_slotid_locked from 8 to 1. Thus there is one slot (slotid 0) available for use but it has not been freed by layoutget proir to the getdeviceinfo request. So the layout get call is waiting for the getdeviceinfo call to complete, and the getdeviceinfo call is waiting for layoutget to free the slot. Signed-off-by: Andy Adamson --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 1b18368..8ca92d0 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -8504,10 +8504,10 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout, gfp_t gfp_flags) &lgp->res.stateid, status); + nfs4_sequence_free_slot(&lgp->res.seq_res); /* if layoutp->len is 0, nfs4_layoutget_prepare called rpc_exit */ if (status == 0 && lgp->res.layoutp->len) lseg = pnfs_layout_process(lgp); - nfs4_sequence_free_slot(&lgp->res.seq_res); rpc_put_task(task); dprintk("<-- %s status=%d\n", __func__, status); if (status)