alistair23-linux/fs/nfs
Robert Milkowski 7dc2993a9e NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals
Currently, each time nfs4_do_fsinfo() is called it will do an implicit
NFS4 lease renewal, which is not compliant with the NFS4 specification.
This can result in a lease being expired by an NFS server.

Commit 83ca7f5ab3 ("NFS: Avoid PUTROOTFH when managing leases")
introduced implicit client lease renewal in nfs4_do_fsinfo(),
which can result in the NFSv4.0 lease to expire on a server side,
and servers returning NFS4ERR_EXPIRED or NFS4ERR_STALE_CLIENTID.

This can easily be reproduced by frequently unmounting a sub-mount,
then stat'ing it to get it mounted again, which will delay or even
completely prevent client from sending RENEW operations if no other
NFS operations are issued. Eventually nfs server will expire client's
lease and return an error on file access or next RENEW.

This can also happen when a sub-mount is automatically unmounted
due to inactivity (after nfs_mountpoint_expiry_timeout), then it is
mounted again via stat(). This can result in a short window during
which client's lease will expire on a server but not on a client.
This specific case was observed on production systems.

This patch removes the implicit lease renewal from nfs4_do_fsinfo().

Fixes: 83ca7f5ab3 ("NFS: Avoid PUTROOTFH when managing leases")
Signed-off-by: Robert Milkowski <rmilkowski@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2020-02-04 12:27:55 -05:00
..
blocklayout
filelayout pNFS/filelayout: enable LAYOUTGET on OPEN 2019-09-24 16:28:38 -04:00
flexfilelayout pNFS/flexfiles: Add tracing for layout errors 2020-01-15 10:54:33 -05:00
cache_lib.c
cache_lib.h
callback.c
callback.h NFSv4: NFSv4 callbacks also support 64-bit timestamps 2019-11-03 21:28:44 -05:00
callback_proc.c NFSv4: nfs4_callback_getattr() should ignore revoked delegations 2019-11-03 21:28:45 -05:00
callback_xdr.c NFS4: Report callback authentication errors 2020-01-15 10:54:31 -05:00
client.c NFS: allow deprecation of NFS UDP protocol 2020-01-24 16:51:13 -05:00
delegation.c NFSv4: Limit the total number of cached delegations 2020-02-03 16:35:07 -05:00
delegation.h NFSv4: Try to return the delegation immediately when marked for return on close 2020-02-03 16:35:07 -05:00
dir.c nfs: optimise readdir cache page invalidation 2020-02-04 10:50:44 -05:00
direct.c NFS: Fix nfs_direct_write_reschedule_io() 2020-01-15 10:54:33 -05:00
dns_resolve.c NFS: Replace various occurrences of kstrndup() with kmemdup_nul() 2020-02-03 16:35:07 -05:00
dns_resolve.h
export.c NFS: Add a tracepoint in nfs_fh_to_dentry() 2019-11-03 21:28:46 -05:00
file.c NFS: Fix up fsync() when the server rebooted 2020-01-15 10:54:32 -05:00
fs_context.c nfs: Return EINVAL rather than ERANGE for mount parse errors 2020-01-24 16:51:13 -05:00
fscache-index.c nfs: fscache: use timespec64 in inode auxdata 2020-01-15 10:54:30 -05:00
fscache.c nfs: fscache: use timespec64 in inode auxdata 2020-01-15 10:54:30 -05:00
fscache.h nfs: fscache: use timespec64 in inode auxdata 2020-01-15 10:54:30 -05:00
getroot.c NFS: Attach supplementary error information to fs_context. 2020-01-15 10:15:17 -05:00
inode.c NFS: nfs_find_open_context() should use cred_fscmp() 2020-02-03 16:35:07 -05:00
internal.h NFS: Add softreval behaviour to nfs_lookup_revalidate() 2020-01-24 16:51:13 -05:00
io.c
iostat.h
Kconfig NFS: allow deprecation of NFS UDP protocol 2020-01-24 16:51:13 -05:00
Makefile NFS: Move mount parameterisation bits into their own file 2020-01-15 10:15:17 -05:00
mount_clnt.c NFS: remove unused macros 2020-02-03 10:43:06 -05:00
namespace.c NFS: Add softreval behaviour to nfs_lookup_revalidate() 2020-01-24 16:51:13 -05:00
netns.h
nfs.h
nfs2super.c
nfs2xdr.c nfs: remove timespec from xdr_encode_nfstime 2020-01-15 10:54:30 -05:00
nfs3_fs.h NFS: Additional refactoring for fs_context conversion 2020-01-15 10:15:17 -05:00
nfs3acl.c
nfs3client.c NFS: Additional refactoring for fs_context conversion 2020-01-15 10:15:17 -05:00
nfs3proc.c NFS: Add softreval behaviour to nfs_lookup_revalidate() 2020-01-24 16:51:13 -05:00
nfs3super.c
nfs3xdr.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-01-15 10:54:32 -05:00
nfs4_fs.h NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals 2020-02-04 12:27:55 -05:00
nfs4client.c NFS: Additional refactoring for fs_context conversion 2020-01-15 10:15:17 -05:00
nfs4file.c NFS: Add fs_context support. 2020-01-15 10:15:17 -05:00
nfs4getroot.c
nfs4idmap.c
nfs4idmap.h
nfs4namespace.c NFS: Replace various occurrences of kstrndup() with kmemdup_nul() 2020-02-03 16:35:07 -05:00
nfs4proc.c NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals 2020-02-04 12:27:55 -05:00
nfs4renewd.c NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals 2020-02-04 12:27:55 -05:00
nfs4session.c
nfs4session.h
nfs4state.c NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals 2020-02-04 12:27:55 -05:00
nfs4super.c NFS: Attach supplementary error information to fs_context. 2020-01-15 10:15:17 -05:00
nfs4sysctl.c
nfs4trace.c pNFS/flexfiles: Add tracing for layout errors 2020-01-15 10:54:33 -05:00
nfs4trace.h pNFS/flexfiles: Add tracing for layout errors 2020-01-15 10:54:33 -05:00
nfs4xdr.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-01-15 10:54:32 -05:00
nfs42.h NFS based on file size issue sync copy or fallback to generic copy offload 2019-10-09 12:06:22 -04:00
nfs42proc.c NFS: Fix memory leaks 2020-02-04 11:01:54 -05:00
nfs42xdr.c NFS: add ca_source_server<> to COPY 2019-10-09 12:05:49 -04:00
nfsroot.c
nfstrace.c
nfstrace.h NFS: Improve tracing of permission calls 2020-01-15 10:54:33 -05:00
pagelist.c NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup 2019-08-19 08:56:04 -04:00
pnfs.c NFSv4: pnfs_roc() must use cred_fscmp() to compare creds 2020-02-03 16:35:07 -05:00
pnfs.h pNFS/flexfiles: Record resend attempts on I/O failure 2020-01-15 10:54:32 -05:00
pnfs_dev.c
pnfs_nfs.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-01-15 10:54:32 -05:00
proc.c NFS: Add softreval behaviour to nfs_lookup_revalidate() 2020-01-24 16:51:13 -05:00
read.c NFS: When resending after a short write, reset the reply count to zero 2020-01-15 10:54:33 -05:00
super.c NFS: Add mount option 'softreval' 2020-01-15 10:54:33 -05:00
symlink.c
sysctl.c
sysfs.c fs: nfs: sysfs: Remove NULL check before kfree 2019-11-18 10:38:04 +01:00
sysfs.h
unlink.c
write.c NFS: When resending after a short write, reset the reply count to zero 2020-01-15 10:54:33 -05:00