Re: [RFC][PATCH 1/2] fanotify: add support for FAN_UNMOUNT event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 14, 2023 at 09:29:02PM +0300, Amir Goldstein wrote:
> inotify generates unsolicited IN_UNMOUNT events for every inode
> mark before the filesystem containing the inode is shutdown.
> 
> Unlike IN_UNMOUNT, FAN_UNMOUNT is an opt-in event that can only be
> set on a mount mark and is generated when the mount is unmounted.
> 
> FAN_UNMOUNT requires FAN_REPORT_FID and reports an fid info record
> with fsid of the filesystem and an empty file handle.
> 
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> ---

I think this is a useful addition to the fanotify api and more useful
than IN_UMOUNT.

Going back to your cover letter. Afaiu, IN_UMOUNT is generated when the
superblock in which a watched object resides goes away. That's roughly
what I had in mind with FAN_SB_SHUTDOWN (ignoring naming discusions for
now).



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux