Re: [RFC][PATCH] fanotify_mark.2: Document FAN_MARK_IGNORE

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

 



On Sun 04-09-22 18:51:13, Amir Goldstein wrote:
> A new flavor of FAN_MARK_IGNORED_MASK that helps to resolve the
> ambiguity around the combination of event flags and ignore mask.
> 
> It is also more strict in the events and flags allowed to be
> set in a non-directory inode mark mask and it mandates the use
> of FAN_MARK_IGNORED_SURV_MODIFY flag on filesystem, mount and
> directory inode marks.
> 
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>

<snip>

> +.BR FAN_MARK_IGNORE " (since Linux 6.0)"
> +.\" commit e252f2ed1c8c6c3884ab5dd34e003ed21f1fe6e0
> +This flag has a similar effect as setting the
> +.B FAN_MARK_IGNORED_MASK
> +flag.
> +The events in
> +.I mask
> +shall be added to or removed from the ignore mask.
> +Unlike the
> +.B FAN_MARK_IGNORED_MASK
> +flag,
> +this flag also has the effect that the
> +.B FAN_ONDIR ,
> +and
> +.B FAN_EVENT_ON_CHILD
> +flags take effect on the ignore mask.
> +Specifically, unless
> +.B FAN_ONDIR
> +flag is set with
> +.BR FAN_MARK_IGNORE ,
> +events on directories will not be ignored
> +and if the flag
> +.B FAN_EVENT_ON_CHILD
> +is set,
> +events on children will be ignored.
> +For example,
> +a mark on a directory with combination of
> +a mask with
> +.B FAN_CREATE
> +event
> +and
> +.B FAN_ONDIR
> +flag
> +and an ignore mask with
> +.B FAN_CREATE
> +event
> +and without
> +.B FAN_ONDIR
> +flag,
> +will result in getting only events for creation of sub-directories.
> +When using this flag to add to an ignore mask
> +of a mount, filesystem, or directory inode mark,
> +the
> +.B FAN_MARK_IGNORED_SURV_MODIFY
> +flag must be specified.

Perhaps a short rationaly why this flag is required would be good here?

> +Failure to do so will results with
> +.B EINVAL
> +or
> +.B EISDIR
> +error.

<snip>

> +.TP
> +.B EISDIR
> +.I flags
> +contains
> +.BR FAN_MARK_IGNORE ,
> +and
> +.BR FAN_MARK_IGNORED_SURV_MODIFY ,

I think it should rather be "but does not contain
FAN_MARK_IGNORED_SURV_MODIFY", shouldn't it?

> +and
> +.I dirfd
> +and
> +.I pathname
> +specify a directory.

Otherwise the changes look good to me.

								Honza

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux