linux/fs/nfsd
J. Bruce Fields 28df3d1539 nfsd: clients don't need to break their own delegations
We currently revoke read delegations on any write open or any operation
that modifies file data or metadata (including rename, link, and
unlink).  But if the delegation in question is the only read delegation
and is held by the client performing the operation, that's not really
necessary.

It's not always possible to prevent this in the NFSv4.0 case, because
there's not always a way to determine which client an NFSv4.0 delegation
came from.  (In theory we could try to guess this from the transport
layer, e.g., by assuming all traffic on a given TCP connection comes
from the same client.  But that's not really correct.)

In the NFSv4.1 case the session layer always tells us the client.

This patch should remove such self-conflicts in all cases where we can
reliably determine the client from the compound.

To do that we need to track "who" is performing a given (possibly
lease-breaking) file operation.  We're doing that by storing the
information in the svc_rqst and using kthread_data() to map the current
task back to a svc_rqst.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2020-05-08 21:23:10 -04:00
..
acl.h nfsd: eliminate an unnecessary acl size limit 2019-08-28 21:13:45 -04:00
auth.c nfsd: auth: Fix gid sorting when rootsquash enabled 2018-01-22 20:13:07 -08:00
auth.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blocklayout.c nfsd: convert fi_deleg_file and ls_file fields to nfsd_file 2019-08-19 11:09:09 -04:00
blocklayoutxdr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blocklayoutxdr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.h nfsd4: drc containerization 2019-07-03 17:52:08 -04:00
current_stateid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
export.c nfsd: export upcalls must not return ESTALE when mountd is down 2020-03-16 12:04:33 -04:00
export.h knfsd: Allow lockless lookups of the exports 2018-10-29 16:58:04 -04:00
fault_inject.c nfsd: no need to check return value of debugfs_create functions 2019-07-03 16:57:17 +02:00
filecache.c fs: nfsd: fileache.c: Use built-in RCU list checking 2020-03-16 12:04:31 -04:00
filecache.h nfsd: convert file cache to use over/underflow safe refcount 2020-02-06 11:22:55 -05:00
flexfilelayout.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
flexfilelayoutxdr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
flexfilelayoutxdr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idmap.h nfsd: Remove duplicate define of IDMAP_NAMESZ/IDMAP_TYPE_xx 2015-07-20 14:58:46 -04:00
Kconfig NFSD: Fix NFS server build errors 2020-03-16 12:04:34 -04:00
lockd.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile nfsd: add a new struct file caching facility to nfsd 2019-08-19 11:00:39 -04:00
netns.h nfsd: set the server_scope during service startup 2020-03-16 12:04:30 -04:00
nfs2acl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfs3acl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfs3proc.c nfsd: Ensure sampling of the write verifier is atomic with the write 2020-01-22 16:25:41 -05:00
nfs3xdr.c nfsd: Ensure sampling of the write verifier is atomic with the write 2020-01-22 16:25:41 -05:00
nfs4acl.c nfsd: check permissions when setting ACLs 2016-06-24 12:11:52 -04:00
nfs4callback.c SUNRPC: Fix backchannel RPC soft lockups 2020-04-17 12:40:31 -04:00
nfs4idmap.c nfsd: export upcalls must not return ESTALE when mountd is down 2020-03-16 12:04:33 -04:00
nfs4layouts.c nfsd: fix delay timer on 32-bit architectures 2019-12-19 17:46:08 -05:00
nfs4proc.c nfsd: clients don't need to break their own delegations 2020-05-08 21:23:10 -04:00
nfs4recover.c nfsd: make 'boot_time' 64-bit wide 2019-12-19 17:46:08 -05:00
nfs4state.c nfsd: clients don't need to break their own delegations 2020-05-08 21:23:10 -04:00
nfs4xdr.c NFSD: Clean up nfsd4_encode_readv 2020-03-16 12:04:31 -04:00
nfscache.c nfsd4: Fix kernel crash when reading proc file reply_cache_stats 2019-08-16 13:36:55 -04:00
nfsctl.c nfsd: fsnotify on rmdir under nfsd/clients/ 2020-03-19 11:33:42 -04:00
nfsd.h nfsd: clients don't need to break their own delegations 2020-05-08 21:23:10 -04:00
nfsfh.c nfsd: Add tracing to nfsd_set_fh_dentry() 2020-03-16 12:04:33 -04:00
nfsfh.h nfsd: handle nfs3 timestamps as unsigned 2019-12-19 17:46:08 -05:00
nfsproc.c nfsd: Ensure sampling of the write verifier is atomic with the write 2020-01-22 16:25:41 -05:00
nfssvc.c nfsd: clients don't need to break their own delegations 2020-05-08 21:23:10 -04:00
nfsxdr.c nfsd: knfsd must use the container user namespace 2019-04-24 09:46:35 -04:00
pnfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
state.h nfsd: use boottime for lease expiry calculation 2019-12-19 22:07:17 -05:00
stats.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
stats.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c nfsd: move include of state.h from trace.c to trace.h 2015-10-23 15:57:29 -04:00
trace.h nfsd: Add tracepoints for update of the expkey and export cache entries 2020-03-16 12:04:33 -04:00
vfs.c nfsd: Ensure sampling of the write verifier is atomic with the write 2020-01-22 16:25:41 -05:00
vfs.h nfsd: Ensure sampling of the write verifier is atomic with the write 2020-01-22 16:25:41 -05:00
xdr3.h nfsd: Ensure sampling of the write verifier is atomic with the write 2020-01-22 16:25:41 -05:00
xdr4.h NFSD add nfs4 inter ssc to nfsd4_copy 2019-12-09 11:44:07 -05:00
xdr4cb.h NFSD CB_OFFLOAD xdr 2018-09-25 20:34:54 -04:00
xdr.h NFSD: Clean up legacy NFS SYMLINK argument XDR decoders 2018-04-03 15:08:16 -04:00