fanotify super block mark and ignore mask

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

 



Hi Jan,

It's been over a year since I posted my last patch revision [1].
IIRC, one of your comments during LSF was to attach
marks to a super block instead of the root inode.

The patch series on my fanotify_sb branch [2] implements super
block marks after a lot of cleanup and re-factoring patches.
The patches pass all the fsnotify LTP tests and some very basic
sb mark tests, but before I post the series, I would like to write
some more tests.

While this patch series stands for itself and adds a feature,
that Marko requested, for me this is only a convenient checkpoint
before adding fanotify support for more events, because the super
block is always available from fsnotify hooks, whereas the mount is not.

The main issue I have right now is with the ignore masks logic.
The logic in send_to_group() doesn't match the logic in
fanotify_should_send_event(), which in turn, does not match the man
page documentation.

I was thinking:
- ignore mask on inode negates inode and mount and sb mark mask
- ignore mask on mount negates mount and sb mark masks, but not inode mark mask
- ignore mask on sb negates only sb mark mask

The reasoning is that is makes sense to include a super set and exclude
a subset. The problem is that inode is not really a subset of a mount, but
mount and inode are really a subset of a super block.

Current fanotify code seems to allow including an inode, but excluding
a mount, which will result (I think) in getting events on the inode unless
it was accessed from a specific mount. The examples of ignore mask in the
fanotify(7) man page do not imply that this use case was intended and I
really doubt if anybody is using ignore mask this way.

I wonder if we should change the behavior of fanotify to only allow
excluding an inode from a mount mark and not vice versa, as suggested
by man page and by the logic in fsnotify() and send_to_group() and wait
to see if anybody shouts.

Thoughts?

Amir.

[1] https://lwn.net/Articles/716973/
[2] https://github.com/amir73il/linux/commits/fanotify_sb



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux