]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
NFS filelayout:call GETDEVICEINFO after pnfs_layout_process completes
authorAndy Adamson <andros@netapp.com>
Mon, 20 Mar 2017 22:07:02 +0000 (18:07 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 28 Mar 2017 15:47:42 +0000 (11:47 -0400)
commit8d40b0f14846f7d45c7c72d343fe62cb866dda34
tree150bcebd8639d7bab9ee497f40e5a502402402a9
parent629dc8704b922f0c46f3025bd3486c2bc51eb7a6
NFS filelayout:call GETDEVICEINFO after pnfs_layout_process completes

Fix a filelayout GETDEVICEINFO call hang triggered from the LAYOUTGET
pnfs_layout_process where the GETDEVICEINFO call is waiting for a
session slot, and the LAYOUGET call is waiting for pnfs_layout_process
to complete before freeing the slot GETDEVICEINFO is waiting for..

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.

In order to ensure that layoutrecall callbacks are processed in the
correct order, nfs4_proc_layoutget processing needs to be finished
e.g. pnfs_layout_process) before giving up the slot that identifies
the layoutget (see referring_call_exists).

Move the filelayout_check_layout nfs4_find_get_device call outside of
the pnfs_layout_process call tree.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/filelayout/filelayout.c