All of lore.kernel.org
 help / color / mirror / Atom feed
From: <andros@netapp.com>
To: <trondmy@primarydata.com>, <linux-nfs@vger.kernel.org>
Cc: Andy Adamson <andros@netapp.com>
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	[thread overview]
Message-ID: <20170315151851.5762-1-andros@netapp.com> (raw)

From: Andy Adamson <andros@netapp.com>

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 <andros@netapp.com>
---
 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)
-- 
2.9.3


             reply	other threads:[~2017-03-15 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 15:18 andros [this message]
2017-03-15 19:09 ` [PATCH Version 1 1/1] NFS free the layoutget slot before calling pnfs_layout_process Trond Myklebust
2017-03-15 19:18   ` Adamson, Andy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170315151851.5762-1-andros@netapp.com \
    --to=andros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.