• Trond Myklebust's avatar
    NFSv4.1 fix infinite loop on I/O. · 8bfbd71c
    Trond Myklebust authored
    commit 994b15b9 upstream.
    
    The previous fix broke recovery of delegated stateids because it assumes
    that if we did not mark the delegation as suspect, then the delegation has
    effectively been revoked, and so it removes that delegation irrespectively
    of whether or not it is valid and still in use. While this is "mostly
    harmless" for ordinary I/O, we've seen pNFS fail with LAYOUTGET spinning
    in an infinite loop while complaining that we're using an invalid stateid
    (in this case the all-zero stateid).
    
    What we rather want to do here is ensure that the delegation is always
    correctly marked as needing testing when that is the case. So we want
    to close the loophole offered by nfs4_schedule_stateid_recovery(),
    which marks the state as needing to be reclaimed, but not the
    delegation that may be backing it.
    
    Fixes: 0e3d3e5d ("NFSv4.1 fix infinite loop on IO BAD_STATEID error")
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
    Cc: stable@vger.kernel.org # v4.11+
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    8bfbd71c
Name
Last commit
Last update
..
blocklayout Loading commit data...
filelayout Loading commit data...
flexfilelayout Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
cache_lib.c Loading commit data...
cache_lib.h Loading commit data...
callback.c Loading commit data...
callback.h Loading commit data...
callback_proc.c Loading commit data...
callback_xdr.c Loading commit data...
client.c Loading commit data...
delegation.c Loading commit data...
delegation.h Loading commit data...
dir.c Loading commit data...
direct.c Loading commit data...
dns_resolve.c Loading commit data...
dns_resolve.h Loading commit data...
export.c Loading commit data...
file.c Loading commit data...
fscache-index.c Loading commit data...
fscache.c Loading commit data...
fscache.h Loading commit data...
getroot.c Loading commit data...
inode.c Loading commit data...
internal.h Loading commit data...
io.c Loading commit data...
iostat.h Loading commit data...
mount_clnt.c Loading commit data...
namespace.c Loading commit data...
netns.h Loading commit data...
nfs.h Loading commit data...
nfs2super.c Loading commit data...
nfs2xdr.c Loading commit data...
nfs3_fs.h Loading commit data...
nfs3acl.c Loading commit data...
nfs3client.c Loading commit data...
nfs3proc.c Loading commit data...
nfs3super.c Loading commit data...
nfs3xdr.c Loading commit data...
nfs42.h Loading commit data...
nfs42proc.c Loading commit data...
nfs42xdr.c Loading commit data...
nfs4_fs.h Loading commit data...
nfs4client.c Loading commit data...
nfs4file.c Loading commit data...
nfs4getroot.c Loading commit data...
nfs4idmap.c Loading commit data...
nfs4idmap.h Loading commit data...
nfs4namespace.c Loading commit data...
nfs4proc.c Loading commit data...
nfs4renewd.c Loading commit data...
nfs4session.c Loading commit data...
nfs4session.h Loading commit data...
nfs4state.c Loading commit data...
nfs4super.c Loading commit data...
nfs4sysctl.c Loading commit data...
nfs4trace.c Loading commit data...
nfs4trace.h Loading commit data...
nfs4xdr.c Loading commit data...
nfsroot.c Loading commit data...
nfstrace.c Loading commit data...
nfstrace.h Loading commit data...
pagelist.c Loading commit data...
pnfs.c Loading commit data...
pnfs.h Loading commit data...
pnfs_dev.c Loading commit data...
pnfs_nfs.c Loading commit data...
proc.c Loading commit data...
read.c Loading commit data...
super.c Loading commit data...
symlink.c Loading commit data...
sysctl.c Loading commit data...
unlink.c Loading commit data...
write.c Loading commit data...