From: "Darrick J. Wong" <djwong@kernel.org>
To: Ian Kent <raven@themaw.net>
Cc: Christian Brauner <brauner@kernel.org>,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
hch@lst.de, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/4] fs: send uevents for filesystem mount events
Date: Mon, 5 Jan 2026 09:26:18 -0800 [thread overview]
Message-ID: <20260105172618.GB191481@frogsfrogsfrogs> (raw)
In-Reply-To: <284c79aa-7088-40a5-a6f5-31de8404e62f@themaw.net>
On Sat, Dec 27, 2025 at 07:58:10AM +0800, Ian Kent wrote:
>
> On 24/12/25 20:47, Christian Brauner wrote:
> > On Wed, Dec 17, 2025 at 06:04:29PM -0800, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <djwong@kernel.org>
> > >
> > > Add the ability to send uevents whenever a filesystem mounts, unmounts,
> > > or goes down. This will enable XFS to start daemons whenever a
> > > filesystem is first mounted.
> > >
> > > Regrettably, we can't wire this directly into get_tree_bdev_flags or
> > > generic_shutdown_super because not all filesystems set up a kobject
> > > representation in sysfs, and the VFS has no idea if a filesystem
> > > actually does that.
> > >
> > > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > > ---
> > I have issues with uevents as a mechanism for this. Uevents are tied to
> > network namespaces and they are not really namespaced appropriately. Any
> > filesystem that hooks into this mechanism will spew uevents into the
> > initial network namespace unconditionally. Any container mountable
> > filesystem that wants to use this interface will spam the host with
> > this event though the even is completely useless without appropriate
> > meta information about the relevant mount namespaces and further
> > parameters. This is a design dead end going forward imho. So please
> > let's not do this.
> >
> > Instead ties this to fanotify which is the right interface for this.
> > My suggestion would be to tie this to mount namespaces as that's the
> > appropriate object. Fanotify already supports listening for general
> > mount/umount events on mount namespaces. So extend it to send filesystem
> > creation/destruction events so that a caller may listen on the initial
> > mount namespace - where xfs fses can be mounted - you could even make it
> > filterable per filesystem type right away.
>
> Seconded, there are way too many sources of mount events for them to not
>
> be specific and targeted.
NP, thanks to you both for the quick feedback. :)
--D
>
> Just my opinion, ;),
>
> Ian
>
>
next prev parent reply other threads:[~2026-01-05 17:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 2:02 [PATCHSET V4 2/2] fs: send uevents on mount and unmount Darrick J. Wong
2025-12-18 2:04 ` [PATCH 1/4] fs: send uevents for filesystem mount events Darrick J. Wong
2025-12-18 5:26 ` Christoph Hellwig
2025-12-18 19:49 ` Darrick J. Wong
2025-12-18 23:33 ` [PATCH V4.1 " Darrick J. Wong
2025-12-24 12:47 ` [PATCH " Christian Brauner
2025-12-26 23:58 ` Ian Kent
2026-01-05 17:26 ` Darrick J. Wong [this message]
2026-01-05 17:25 ` Darrick J. Wong
2025-12-18 2:04 ` [PATCH 2/4] xfs: send uevents when major filesystem events happen Darrick J. Wong
2025-12-18 5:27 ` Christoph Hellwig
2025-12-18 2:05 ` [PATCH 3/4] ext4: convert ext4_root to a kset Darrick J. Wong
2025-12-18 5:27 ` Christoph Hellwig
2025-12-18 2:05 ` [PATCH 4/4] ext4: send uevents when major filesystem events happen Darrick J. Wong
2025-12-18 5:27 ` Christoph Hellwig
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=20260105172618.GB191481@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=brauner@kernel.org \
--cc=hch@lst.de \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=raven@themaw.net \
/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