On Mon, Mar 31, 2025 at 4:03 PM Jan Kara <jack@xxxxxxx> wrote: > > On Mon 31-03-25 15:51:01, Amir Goldstein wrote: > > Used to subscribe for notifications for when mounts > > are attached/detached from a mount namespace. > > > > Cc: Jan Kara <jack@xxxxxxx> > > Cc: Miklos Szeredi <mszeredi@xxxxxxxxxx> > > Cc: Christian Brauner <brauner@xxxxxxxxxx> > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > ... > > @@ -442,6 +459,12 @@ A file or directory that was opened read-only > > .RB ( O_RDONLY ) > > was closed. > > .TP > > +.BR FAN_MNT_ATTACH > > +A mount was attached to mount namespace. > > +.TP > > +.BR FAN_MNT_DETACH > > +A mount was detached to mount namespace. > ^^ from > thanks for spotting > > @@ -727,6 +751,21 @@ in case of a terminated process, the value will be > > .BR \-ESRCH . > > .P > > The fields of the > > +.I fanotify_event_info_mnt > > +structure are as follows: > > +.TP > > +.I .hdr > > +This is a structure of type > > +.IR fanotify_event_info_header . > > +The > > +.I .info_type > > +field is set to > > +.BR FAN_EVENT_INFO_TYPE_MNT . > > +.TP > > +.I .mnt_id > > +Identifies the mount associated with the event. > > Since mnt_id is not well established, I think we should tell here a bit > more about the mnt_id - that this is the ID you'll get from listmount(2) > and can use it e.g. with statmount(2). You are right, but it is actually established much sooner, As I described mount_id in the recently merged man page patch name_to_handle_at.2: Document the AT_HANDLE_MNT_ID_UNIQUE flag ...is the unique mount id as the one returned by .BR statx (2) with the .BR STATX_MNT_ID_UNIQUE flag. So I will add a reference to statx here as well. Thanks, Amir.