linux/Documentation/filesystems
Christian Brauner 09ee2a670d
Merge patch series "Fixup NLM and kNFSD file lock callbacks"
Benjamin Coddington <bcodding@redhat.com> says:

Last year both GFS2 and OCFS2 had some work done to make their locking more
robust when exported over NFS.  Unfortunately, part of that work caused both
NLM (for NFS v3 exports) and kNFSD (for NFSv4.1+ exports) to no longer send
lock notifications to clients.

This in itself is not a huge problem because most NFS clients will still
poll the server in order to acquire a conflicted lock, but now that I've
noticed it I can't help but try to fix it because there are big advantages
for setups that might depend on timely lock notifications, and we've
supported that as a feature for a long time.

Its important for NLM and kNFSD that they do not block their kernel threads
inside filesystem's file_lock implementations because that can produce
deadlocks.  We used to make sure of this by only trusting that
posix_lock_file() can correctly handle blocking lock calls asynchronously,
so the lock managers would only setup their file_lock requests for async
callbacks if the filesystem did not define its own lock() file operation.

However, when GFS2 and OCFS2 grew the capability to correctly
handle blocking lock requests asynchronously, they started signalling this
behavior with EXPORT_OP_ASYNC_LOCK, and the check for also trusting
posix_lock_file() was inadvertently dropped, so now most filesystems no
longer produce lock notifications when exported over NFS.

I tried to fix this by simply including the old check for lock(), but the
resulting include mess and layering violations was more than I could accept.
There's a much cleaner way presented here using an fop_flag, which while
potentially flag-greedy, greatly simplifies the problem and grooms the
way for future uses by both filesystems and lock managers alike.

* patches from https://lore.kernel.org/r/cover.1726083391.git.bcodding@redhat.com:
  exportfs: Remove EXPORT_OP_ASYNC_LOCK
  NLM/NFSD: Fix lock notifications for async-capable filesystems
  gfs2/ocfs2: set FOP_ASYNC_LOCK
  fs: Introduce FOP_ASYNC_LOCK
  NFS: trace: show TIMEDOUT instead of 0x6e
  nfsd: use system_unbound_wq for nfsd_file_gc_worker()
  nfsd: count nfsd_file allocations
  nfsd: fix refcount leak when file is unhashed after being found
  nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire
  nfsd: add list_head nf_gc to struct nfsd_file

Link: https://lore.kernel.org/r/cover.1726083391.git.bcodding@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-10-02 07:52:07 +02:00
..
bcachefs bcachefs: Fix a spelling error in docs 2024-09-09 09:41:48 -04:00
caching netfs: clean up after renaming FSCACHE_DEBUG config 2024-08-12 22:03:26 +02:00
ext4 Documentation: Fix typos 2023-08-18 11:29:03 -06:00
iomap vfs-6.12.blocksize 2024-09-20 17:53:17 -07:00
nfs Merge patch series "Fixup NLM and kNFSD file lock callbacks" 2024-10-02 07:52:07 +02:00
smb ksmbd: fix spelling mistakes in documentation 2024-08-18 17:02:36 -05:00
spufs Documentation: spufs: correct a duplicate word typo 2022-09-27 13:21:44 -06:00
xfs docs: describe xfs directory tree online fsck 2024-04-15 14:59:01 -07:00
9p.rst USB/Thunderbolt update for 6.12-rc1 2024-09-26 09:45:36 -07:00
adfs.rst
affs.rst
afs.rst afs: Documentation: correct reference to CONFIG_AFS_FS 2023-07-21 13:46:02 -06:00
api-summary.rst doc: split buffer.rst out of api-summary.rst 2024-05-05 17:53:40 -07:00
autofs-mount-control.rst autofs: use flexible array in ioctl structure 2023-05-30 16:42:00 -07:00
autofs.rst docs:filesystem: fix mispelled words on autofs page 2024-09-10 15:35:36 -06:00
automount-support.rst
befs.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
bfs.rst
btrfs.rst MAINTAINERS: remove links to obsolete btrfs.wiki.kernel.org 2023-09-08 14:21:27 +02:00
buffer.rst doc: split buffer.rst out of api-summary.rst 2024-05-05 17:53:40 -07:00
ceph.rst doc: ceph: update userspace command to get CephFS metadata 2024-05-23 10:35:47 +02:00
coda.rst
configfs.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
cramfs.rst
dax.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
debugfs.rst debugfs: small Documentation cleaning 2022-11-09 13:58:55 -07:00
devpts.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
directory-locking.rst Docs: typos/spelling 2024-05-02 10:02:29 -06:00
dlmfs.rst docs: update ocfs2-devel mailing list address 2023-07-08 09:29:29 -07:00
dnotify.rst
ecryptfs.rst
efivarfs.rst Documentation: Mark the 'efivars' sysfs interface as removed 2024-04-13 10:33:02 +02:00
erofs.rst erofs: allow large folios for compressed files 2024-08-19 16:10:04 +08:00
ext2.rst ext2: remove nobh support 2022-08-02 12:34:04 -04:00
ext3.rst
f2fs.rst f2fs: assign the write hint per stream by default 2024-04-19 17:56:13 +00:00
fiemap.rst
files.rst docs: filesystems: fix typo in docs 2024-02-09 10:37:20 +01:00
fscrypt.rst fscrypt: write CBC-CTS instead of CTS-CBC 2024-02-23 21:38:59 -08:00
fsverity.rst documentation: add IPE documentation 2024-08-20 14:03:47 -04:00
fuse-io.rst docs/fuse-io: Document the usage of DIRECT_IO_ALLOW_MMAP 2023-12-04 10:16:53 +01:00
fuse.rst fuse: Add module param for CAP_SYS_ADMIN access bypassing allow_other 2022-07-21 16:06:19 +02:00
gfs2-glocks.rst gfs2: Get rid of demote_ok checks 2024-05-29 15:34:55 +02:00
gfs2-uevents.rst
gfs2.rst
hfs.rst
hfsplus.rst
hpfs.rst
idmappings.rst doc: correcting the idmapping mount example 2024-08-30 08:22:37 +02:00
index.rst Documentation: the design of iomap and how to port 2024-06-19 15:58:19 +02:00
inotify.rst
isofs.rst
journalling.rst docs:filesystems: fix spelling and grammar mistakes 2024-09-10 15:36:50 -06:00
locking.rst fs: Convert aops->write_begin to take a folio 2024-08-07 11:33:21 +02:00
locks.rst docs: fs: locks.rst: update comment about mandatory file locking 2021-10-19 06:48:21 -04:00
mount_api.rst fs_parse: add uid & gid option option parsing helpers 2024-07-02 06:20:49 +02:00
netfs_library.rst docs: filesystems: corrected grammar of netfs page 2024-09-12 12:20:43 +02:00
nilfs2.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
ntfs3.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
ocfs2-online-filecheck.rst
ocfs2.rst docs: update ocfs2-devel mailing list address 2023-07-08 09:29:29 -07:00
omfs.rst
orangefs.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
overlayfs.rst overlayfs.rst: update metacopy section in overlayfs documentation 2024-09-08 15:36:38 +02:00
path-lookup.rst Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-07-03 11:41:14 -07:00
path-lookup.txt
porting.rst getting rid of bogus set_blocksize() uses, switching it 2024-05-21 08:34:51 -07:00
proc.rst docs/procfs: call out ioctl()-based PROCMAP_QUERY command existence 2024-07-12 15:52:12 -07:00
qnx6.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
quota.rst
ramfs-rootfs-initramfs.rst Documentation/filesystems: ramfs-rootfs-initramfs: use :Author: 2023-05-16 12:55:35 -06:00
relay.rst
romfs.rst
seq_file.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
sharedsubtree.rst Documentation/filesystems: sharedsubtree: add section headings 2023-05-16 12:50:05 -06:00
splice.rst
squashfs.rst docs: filesystems: document the squashfs specific mount options 2023-12-10 17:21:31 -08:00
sysfs.rst driver core: bus: mark the struct bus_type for sysfs callbacks as constant 2023-03-23 13:20:40 +01:00
sysv-fs.rst
tmpfs.rst tmpfs,xattr: enable limited user extended attributes 2023-08-10 12:06:04 +02:00
ubifs-authentication.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
ubifs.rst Documentation: ubifs: Fix compression idiom 2022-10-10 13:01:10 -06:00
udf.rst
vfat.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
vfs.rst ALong with the usual shower of singleton patches, notable patch series in 2024-09-21 07:29:05 -07:00
virtiofs.rst
zonefs.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00