[GIT PULL] vfs fanotify fsid updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Linus,

/* Summary */
This work is part of the plan to enable fanotify to serve as a drop-in
replacement for inotify. While inotify is availabe on all filesystems,
fanotify currently isn't.

In order to support fanotify on all filesystems two things are needed:

(1) all filesystems need to support AT_HANDLE_FID
(2) all filesystems need to report a non-zero f_fsid

This pull request contains (1) and allows filesystems to encode
non-decodable file handlers for fanotify without implementing any
exportfs operations by encoding a file id of type FILEID_INO64_GEN from
i_ino and i_generation.

Filesystems that want to opt out of encoding non-decodable file ids for
fanotify that don't support NFS export can do so by providing an empty
export_operations struct.

The pull request also partially addresses (2) by generating f_fsid for
simple filesystems as well as freevxfs. Remaining filesystems will be
dealt with by separate patches.

Finally, this contains the patch from the current exportfs maintainers
which moves exportfs under vfs with Chuck, Jeff, and Amir as maintainers
and vfs.git as tree.

/* Testing */
clang: Debian clang version 16.0.6 (16)
gcc: gcc (Debian 13.2.0-5) 13.2.0

All patches are based on v6.6-rc7 and have been sitting in linux-next.
A single build failure was reported but has since been fixed.

/* Conflicts */
This will have a merge conflict with the vfs-6.7.iomap pull request I
sent out earlier:

  [GIT PULL] vfs iomap updates
  https://lore.kernel.org/r/20231107-vfs-iomap-60b485c2b4fb@brauner

It should be fairly obvious how to resolve.

It will also have a merge conflict with current mainline that I suggest
to resolve as:

diff --cc Documentation/filesystems/porting.rst
index d69f59700a23,9cc6cb27c4d5..000000000000
--- a/Documentation/filesystems/porting.rst
+++ b/Documentation/filesystems/porting.rst
@@@ -1050,5 -1050,7 +1050,14 @@@ kill_anon_super(), or kill_block_super(

  **mandatory**

 +Lock ordering has been changed so that s_umount ranks above open_mutex again.
 +All places where s_umount was taken under open_mutex have been fixed up.
++
++---
++
++**mandatory**
++
+ export_operations ->encode_fh() no longer has a default implementation to
+ encode FILEID_INO32_GEN* file handles.
+ Filesystems that used the default implementation may use the generic helper
+ generic_encode_ino32_fh() explicitly.

The following changes since commit 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1:

  Linux 6.6-rc7 (2023-10-22 12:11:21 -1000)

are available in the Git repository at:

  git@xxxxxxxxxxxxxxxxxxx:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.7.fsid

for you to fetch changes up to 4ad714df58e646d4b2a454a7dface8ff903911c4:

  MAINTAINERS: create an entry for exportfs (2023-11-07 15:06:01 +0100)

Please consider pulling these changes from the signed vfs-6.7.fsid tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.7.fsid

----------------------------------------------------------------
Amir Goldstein (8):
      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
      fs: report f_fsid from s_dev for "simple" filesystems
      freevxfs: derive f_fsid from bdev->bd_dev
      fs: fix build error with CONFIG_EXPORTFS=m or not defined
      MAINTAINERS: create an entry for exportfs

 Documentation/filesystems/nfs/exporting.rst |  7 +---
 Documentation/filesystems/porting.rst       |  9 +++++
 MAINTAINERS                                 | 13 ++++++-
 fs/affs/namei.c                             |  1 +
 fs/befs/linuxvfs.c                          |  1 +
 fs/efivarfs/super.c                         |  2 +
 fs/efs/super.c                              |  1 +
 fs/erofs/super.c                            |  1 +
 fs/exportfs/expfs.c                         | 57 ++++++++++-------------------
 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/freevxfs/vxfs_super.c                    |  2 +
 fs/fuse/inode.c                             |  7 ++--
 fs/hugetlbfs/inode.c                        |  2 +
 fs/jffs2/super.c                            |  1 +
 fs/jfs/super.c                              |  1 +
 fs/libfs.c                                  | 44 ++++++++++++++++++++++
 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                    | 50 +++++++++++++++++++++++--
 29 files changed, 168 insertions(+), 65 deletions(-)




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux