OK – I’ll take a look. Thanks →Andy On 3/15/17, 3:09 PM, "Trond Myklebust" <trondmy@xxxxxxxxxxxxxxx> wrote: On Wed, 2017-03-15 at 11:18 -0400, andros@xxxxxxxxxx wrote: > From: Andy Adamson <andros@xxxxxxxxxx> > > 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@xxxxxxxxxx> > --- > 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) The placement of the call to nfs4_sequence_free_slot() after the call to pnfs_layout_process() is deliberate, and is needed in order to ensure that layoutrecall callbacks are processed correctly in order after the layoutget has been processed (see referring_call_exists()). The call to nfs4_find_get_deviceid() needs to be moved out of pnfs_update_layout(). In the flexfiles driver, it was moved to nfs4_ff_layout_prepare_ds(), but it looks to me as if the files driver needs to call it earlier due to the need to calculate stripes. Perhaps the right thing is to add a wrapper around pnfs_update_layout() in fs/nfs/filelayout/filelayout.c that can be called by both filelayout_pg_init_read() and filelayout_pg_init_write()? -- Trond Myklebust Linux NFS client maintainer, PrimaryData trond.myklebust@xxxxxxxxxxxxxxx ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥