All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/4] fsnotify: pass single mark to handle_event()
@ 2016-12-27 19:32 Amir Goldstein
  2016-12-27 19:32 ` [RFC][PATCH 1/4] fsnotify: process inode/vfsmount marks independently Amir Goldstein
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Amir Goldstein @ 2016-12-27 19:32 UTC (permalink / raw)
  To: Jan Kara; +Cc: Eric Paris, linux-fsdevel

Jan,

I thought this would turn out simpler, so you may be able to use it
for your work, but I'm afraid that's not the case.

Anyway, since I am leaving for new year's vacation, I am posting
what I have in case you want to use any of it.

It passed some initial tests I ran, but when I wanted to test the
corner case referred to in patch 1, I found that my test program
hangs open() syscalls with kernel 4.10-rc1 before any of my changes.

This is the mark setup I was testing [1]:
  fanotify_mark(fd, FAN_MARK_ADD,
                FAN_OPEN_PERM | FAN_EVENT_ON_CHILD, AT_FDCWD,
                path);
  fanotify_mark(fd, FAN_MARK_ADD | \
                FAN_MARK_IGNORED_SURV_MODIFY | FAN_MARK_IGNORED_MASK
                FAN_OPEN_PERM | FAN_EVENT_ON_CHILD, AT_FDCWD,
                FAN_CLOSE_WRITE, AT_FDCWD,
                path);
  fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
                FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,
                path);

Without FAN_EVENT_ON_CHILD it works fine, but with FAN_EVENT_ON_CHILD,
something bad is going on and I did not have time to look into it.

In general, I would like to start working on an fsnotify testsuite,
so if you have any plans wrt writing extra tests or ideas about specific
missing tests, please let me know about them.

Thanks,
Amir.

[1] https://github.com/amir73il/fsnotify-utils/blob/master/fanotify_example.c

Amir Goldstein (4):
  fsnotify: process inode/vfsmount marks independently
  fsnotify: helper to update marks ignored_mask
  fsnotify: return FSNOTIFY_DROPPED when handle_event() dropped event
  fsnotify: pass single mark to handle_event()

 fs/notify/dnotify/dnotify.c          |   4 +-
 fs/notify/fanotify/fanotify.c        |  44 ++++++---------
 fs/notify/fsnotify.c                 | 102 +++++++++++++++++++++--------------
 fs/notify/inotify/inotify.h          |   2 +-
 fs/notify/inotify/inotify_fsnotify.c |   4 +-
 fs/notify/inotify/inotify_user.c     |   2 +-
 include/linux/fsnotify_backend.h     |  20 ++++++-
 kernel/audit_fsnotify.c              |   2 +-
 kernel/audit_tree.c                  |   2 +-
 kernel/audit_watch.c                 |   2 +-
 10 files changed, 103 insertions(+), 81 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-01-04 11:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 19:32 [RFC][PATCH 0/4] fsnotify: pass single mark to handle_event() Amir Goldstein
2016-12-27 19:32 ` [RFC][PATCH 1/4] fsnotify: process inode/vfsmount marks independently Amir Goldstein
2016-12-27 19:32 ` [RFC][PATCH 2/4] fsnotify: helper to update marks ignored_mask Amir Goldstein
2016-12-27 19:32 ` [RFC][PATCH 3/4] fsnotify: return FSNOTIFY_DROPPED when handle_event() dropped event Amir Goldstein
2016-12-27 19:32 ` [RFC][PATCH 4/4] fsnotify: pass single mark to handle_event() Amir Goldstein
2017-01-04  8:28 ` [RFC][PATCH 0/4] " Jan Kara
2017-01-04  9:57   ` Amir Goldstein
2017-01-04 10:39     ` Jan Kara
2017-01-04 10:45       ` Amir Goldstein
2017-01-04 11:47         ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.