linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/3] Prepare for supporting more filesystems with fanotify
@ 2023-04-25 13:22 Amir Goldstein
  2023-04-25 13:22 ` [RFC][PATCH 1/3] ovl: support encoding non-decodeable file handles Amir Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Amir Goldstein @ 2023-04-25 13:22 UTC (permalink / raw)
  To: Miklos Szeredi, Jan Kara; +Cc: Christian Brauner, linux-unionfs, linux-fsdevel

Miklos,

This is the second part of the proposal to support fanotify reporing
file ids on overlayfs.

The first part [1] relaxes the requirements for filesystems to support
reporting events with fid to require only the ->encode_fh() operation.

In this patch set, overlayfs is changed to meet the new requirements
with default overlay configurations (i.e. no need for nfs_export=on).

The overlayfs and vfs/fanotify patch sets are completely independent.
The are both available on my github branch [2] and there is a simple
LTP test variant that tests reporting fid from overlayfs [3].

Patches 2-3 are not really needed to support reporting fanotify events
with fid, because overlayfs already reports a non-zero f_fsid, it's just
not a very good fsid.  So before allowing to report overlayfs fids, I
prefer to fix f_fsid to be more unique.

I went back and forth about this change of behavior (from real fsid to
per-instance fsid) - can we make this change without breaking any
existing workloads? I don't know.

For now, I added a mount option with a very lousy name (uuid=nogen)
as an escape hatch, but I also left a const bool ovl_uuid_gen_def var
that we can wire to a Kconfig/module option if that is desired.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/20230425130105.2606684-1-amir73il@gmail.com/
[2] https://github.com/amir73il/linux/commits/exportfs_encode_fid
[3] https://github.com/amir73il/ltp/commits/exportfs_encode_fid

Amir Goldstein (3):
  ovl: support encoding non-decodeable file handles
  ovl: report a per-instance f_fsid by default
  ovl: use persistent s_uuid with index=on

 Documentation/filesystems/overlayfs.rst | 10 ++--
 fs/overlayfs/export.c                   | 26 ++++++++---
 fs/overlayfs/inode.c                    |  2 +-
 fs/overlayfs/overlayfs.h                | 10 ++++
 fs/overlayfs/ovl_entry.h                |  3 +-
 fs/overlayfs/super.c                    | 62 ++++++++++++++++++++++---
 fs/overlayfs/util.c                     | 41 ++++++++++++++++
 7 files changed, 135 insertions(+), 19 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2023-07-06 17:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 13:22 [RFC][PATCH 0/3] Prepare for supporting more filesystems with fanotify Amir Goldstein
2023-04-25 13:22 ` [RFC][PATCH 1/3] ovl: support encoding non-decodeable file handles Amir Goldstein
2023-07-06  7:27   ` Amir Goldstein
2023-04-25 13:22 ` [RFC][PATCH 2/3] ovl: report a per-instance f_fsid by default Amir Goldstein
2023-04-25 13:22 ` [RFC][PATCH 3/3] ovl: use persistent s_uuid with index=on Amir Goldstein
2023-07-06  7:19   ` Amir Goldstein
2023-07-06 10:14     ` Amir Goldstein
2023-07-06 17:49       ` 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).