pnfs: lift retry logic from send_layoutget to pnfs_update_layout
authorJeff Layton <jlayton@poochiereds.net>
Tue, 17 May 2016 16:28:46 +0000 (12:28 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 17 May 2016 19:48:12 +0000 (15:48 -0400)
commit83026d80a16ea6a4e4f06a994fc7831b1d8d6375
tree7401207007bbce340734048cc65dbd1ec4977606
parentd03ab29dbbe905c6c7c5abd78e02547fa954ec07
pnfs: lift retry logic from send_layoutget to pnfs_update_layout

If we get back something like NFS4ERR_OLD_STATEID, that will be
translated into -EAGAIN, and the do/while loop in send_layoutget
will drive the call again.

This is not quite what we want, I think. An error like that is a
sign that something has changed. That something could have been a
concurrent LAYOUTGET that would give us a usable lseg.

Lift the retry logic into pnfs_update_layout instead. That allows
us to redo the layout search, and may spare us from having to issue
an RPC.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/pnfs.c