linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Support fanotify FAN_REPORT_FID on all filesystems
@ 2023-11-18 18:30 Amir Goldstein
  2023-11-18 18:30 ` [PATCH 1/2] fanotify: store fsid in mark instead of in connector Amir Goldstein
  2023-11-18 18:30 ` [PATCH 2/2] fanotify: allow "weak" fsid when watching a single filesystem Amir Goldstein
  0 siblings, 2 replies; 13+ messages in thread
From: Amir Goldstein @ 2023-11-18 18:30 UTC (permalink / raw)
  To: Jan Kara; +Cc: Christian Brauner, linux-fsdevel

Jan,

In the vfs fanotify update for v6.7-rc1 [1], we considerably increased
the amount of filesystems that can setup inode marks with FAN_REPORT_FID:
- NFS export is no longer required for setting up inode marks
- All the simple fs gained a non-zero fsid

This leaves the following in-tree filesystems where inode marks with
FAN_REPORT_FID cannot be set:
- nfs, fuse, afs, coda (zero fsid)
- btrfs non-root subvol (fsid not a unique identifier of sb)

This patch set takes care of these remaining cases, by allowing inode
marks, as long as all inode marks in the group are contained to the same
filesystem and same fsid (i.e. subvol).

I've written some basic sanity tests [2] and a man-page update draft [3].

I've also tested fsnotifywait --recursive on fuse and on btrfs subvol.
It works as expected - if tree travesal crosses filesystem or subvol
boundary, setting the subdir mark fails with -EXDEV.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/20231107-vfs-fsid-5037e344d215@brauner/
[2] https://github.com/amir73il/ltp/commits/fanotify_fsid
[3] https://github.com/amir73il/man-pages/commits/fanotify_fsid

Amir Goldstein (2):
  fanotify: store fsid in mark instead of in connector
  fanotify: allow "weak" fsid when watching a single filesystem

 fs/notify/fanotify/fanotify.c      |  34 +++------
 fs/notify/fanotify/fanotify.h      |  21 ++++++
 fs/notify/fanotify/fanotify_user.c | 111 ++++++++++++++++++++++++-----
 fs/notify/mark.c                   |  52 +++-----------
 include/linux/fsnotify_backend.h   |  14 ++--
 5 files changed, 135 insertions(+), 97 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-11-30 16:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-18 18:30 [PATCH 0/2] Support fanotify FAN_REPORT_FID on all filesystems Amir Goldstein
2023-11-18 18:30 ` [PATCH 1/2] fanotify: store fsid in mark instead of in connector Amir Goldstein
2023-11-30 14:25   ` Jan Kara
2023-11-30 15:29     ` Amir Goldstein
2023-11-30 15:50       ` Jan Kara
2023-11-18 18:30 ` [PATCH 2/2] fanotify: allow "weak" fsid when watching a single filesystem Amir Goldstein
2023-11-20  7:42   ` Amir Goldstein
2023-11-20 15:48     ` Christian Brauner
2023-11-20 16:20       ` Amir Goldstein
2023-11-21 13:33     ` Amir Goldstein
2023-11-30 12:42       ` Amir Goldstein
2023-11-30 15:47   ` Jan Kara
2023-11-30 16:28     ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).