linux/fs/nfsd
J. Bruce Fields 94415b06eb nfsd4: a client's own opens needn't prevent delegations
We recently fixed lease breaking so that a client's actions won't break
its own delegations.

But we still have an unnecessary self-conflict when granting
delegations: a client's own write opens will prevent us from handing out
a read delegation even when no other client has the file open for write.

Fix that by turning off the checks for conflicting opens under
vfs_setlease, and instead performing those checks in the nfsd code.

We don't depend much on locks here: instead we acquire the delegation,
then check for conflicts, and drop the delegation again if we find any.

The check beforehand is an optimization of sorts, just to avoid
acquiring the delegation unnecessarily.  There's a race where the first
check could cause us to deny the delegation when we could have granted
it.  But, that's OK, delegation grants are optional (and probably not
even a good idea in that case).

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2020-07-13 17:28:46 -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: make drc_slab global, not per-net 2020-06-01 17:44:45 -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
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 nfsd4: make drc_slab global, not per-net 2020-06-01 17:44:45 -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 nfsd: Fix svc_xprt refcnt leak when setup callback client failed 2020-05-28 18:15:00 -04:00
nfs4idmap.c nfsd: Use seq_putc() in two functions 2020-07-13 17:28:46 -04:00
nfs4layouts.c nfsd: fix delay timer on 32-bit architectures 2019-12-19 17:46:08 -05:00
nfs4proc.c nfsd: implement the xattr functions and en/decode logic 2020-07-13 17:27:03 -04:00
nfs4recover.c nfsd: use crypto_shash_tfm_digest() 2020-05-08 15:32:15 +10:00
nfs4state.c nfsd4: a client's own opens needn't prevent delegations 2020-07-13 17:28:46 -04:00
nfs4xdr.c nfsd: add fattr support for user extended attributes 2020-07-13 17:27:03 -04:00
nfscache.c nfsd: safer handling of corrupted c_type 2020-06-03 11:12:32 -04:00
nfsctl.c nfsd: fix nfsdfs inode reference count leak 2020-06-29 14:48:28 -04:00
nfsd.h nfsd: add defines for NFSv4.2 extended attribute support 2020-07-13 17:27:03 -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: Fix old-style function definition 2020-05-11 09:16:14 -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: Add tracepoints to the NFSD state management code 2020-05-20 17:30:44 -04: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
trace.h NFSD: Add tracepoints for monitoring NFSD callbacks 2020-05-20 17:30:44 -04:00
vfs.c nfsd: take xattr bits into account for permission checks 2020-07-13 17:27:03 -04:00
vfs.h nfsd: define xattr functions to call into their vfs counterparts 2020-07-13 17:27:03 -04:00
xdr.h NFSD: Clean up legacy NFS SYMLINK argument XDR decoders 2018-04-03 15:08:16 -04: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 structure definitions for xattr requests / responses 2020-07-13 17:27:03 -04:00
xdr4cb.h NFSD CB_OFFLOAD xdr 2018-09-25 20:34:54 -04:00