linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>, Jan Kara <jack@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [RFC][PATCH 0/3] Prepare for supporting more filesystems with fanotify
Date: Tue, 25 Apr 2023 16:22:20 +0300	[thread overview]
Message-ID: <20230425132223.2608226-1-amir73il@gmail.com> (raw)

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


             reply	other threads:[~2023-04-25 13:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 13:22 Amir Goldstein [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425132223.2608226-1-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).