[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <284c79aa-7088-40a5-a6f5-31de8404e62f@themaw.net>
Date: Sat, 27 Dec 2025 07:58:10 +0800
From: Ian Kent <raven@...maw.net>
To: Christian Brauner <brauner@...nel.org>,
"Darrick J. Wong" <djwong@...nel.org>
Cc: linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org, hch@....de,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/4] fs: send uevents for filesystem mount events
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@...nel.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@...nel.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.
Just my opinion, ;),
Ian
Powered by blists - more mailing lists