Skip to content

Support more filesystems with FAN_REPORT_FID

Amir Goldstein linux-fsdevel linux-nfs 2 versions – Applied

Status from this message: Applied to the vfs.f_fsid branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 15 repliesApplied
  2. v15 patches 20 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4exportfs: add helpers to check if filesystem can encode/decode file handlesfs/exportfs/expfs.c fs/fhandle.c fs/nfsd/export.c +3 more+34 -161 reply
2/4exportfs: make ->encode_fh() a mandatory method for NFS exportDocumentation/filesystems/nfs/exporting.rst Documentation/filesystems/porting.rst fs/affs/namei.c +16 more+47 -198 replies
3/4exportfs: define FILEID_INO64_GEN* file handle typesfs/fuse/inode.c include/linux/exportfs.h+15 -34 replies
4/4exportfs: support encoding non-decodeable file handles by defaultfs/exportfs/expfs.c include/linux/exportfs.h+36 -60 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchJan KaraJeff LaytonChuck LeverDave KleikampChristoph Hellwig
1/4R-b R-b R-b
2/4R-b R-b A-b A-b
3/4R-b R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] Support more filesystems with FAN_REPORT_FID

Christian,

The grand plan is to be able to use fanotify with FAN_REPORT_FID as a drop-in replacement for inotify, but with current upstream, inotify is supported on all the filesystems and FAN_REPORT_FID only on a few.

Making all filesystem support FAN_REPORT_FID requires that all filesystems will:
1. Support for AT_HANDLE_FID file handles
2. Report non-zero f_fsid

This patch set takes care of the first requirement. Patches were reviewed by Jan and the nfsd maintainers.

I have another patch in review [2] for adding non-zero f_fsid to many simple filesystems, but it is independent of this patch set, so no reason to couple them together.

Note that patch #2 touches many filesystems due to vfs API change, requiring an explicit ->encode_fh() method. I did not gets ACKs from all filesystem maintainers, but the change is trivial and does not change any logic.

Thanks,
Amir.

Changes since v1 [1]:
- Patch #1 already merged into v6.6-rc7
- Fix build without CONFIG_EXPORTFS
- Fix checkpatch warnings
- Define symbolic constant for FILEID_INO64_GEN_LEN
- Clarify documentation (units of) max_len argument

[1] https://lore.kernel.org/r/[email protected]/
[2] https://lore.kernel.org/r/[email protected]/

Amir Goldstein (4):
exportfs: add helpers to check if filesystem can encode/decode file
handles
exportfs: make ->encode_fh() a mandatory method for NFS export
exportfs: define FILEID_INO64_GEN* file handle types
exportfs: support encoding non-decodeable file handles by default

 Documentation/filesystems/nfs/exporting.rst |  7 +--
 Documentation/filesystems/porting.rst       |  9 ++++
 fs/affs/namei.c                             |  1 +
 fs/befs/linuxvfs.c                          |  1 +
 fs/efs/super.c                              |  1 +
 fs/erofs/super.c                            |  1 +
 fs/exportfs/expfs.c                         | 54 +++++++++++++++------
 fs/ext2/super.c                             |  1 +
 fs/ext4/super.c                             |  1 +
 fs/f2fs/super.c                             |  1 +
 fs/fat/nfs.c                                |  1 +
 fs/fhandle.c                                |  6 +--
 fs/fuse/inode.c                             |  7 +--
 fs/jffs2/super.c                            |  1 +
 fs/jfs/super.c                              |  1 +
 fs/nfsd/export.c                            |  3 +-
 fs/notify/fanotify/fanotify_user.c          |  4 +-
 fs/ntfs/namei.c                             |  1 +
 fs/ntfs3/super.c                            |  1 +
 fs/overlayfs/util.c                         |  2 +-
 fs/smb/client/export.c                      | 11 ++---
 fs/squashfs/export.c                        |  1 +
 fs/ufs/super.c                              |  1 +
 include/linux/exportfs.h                    | 51 ++++++++++++++++++-
 24 files changed, 128 insertions(+), 40 deletions(-)
Signature · 1 line
2.34.1