linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>, Eric Paris <eparis@redhat.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC][PATCH 0/4] fsnotify: pass single mark to handle_event()
Date: Wed, 4 Jan 2017 11:39:58 +0100	[thread overview]
Message-ID: <20170104103958.GN3780@quack2.suse.cz> (raw)
In-Reply-To: <CAOQ4uxhC-5K4TEKGeTAYRtY-wH5oUVfW3Ju7G_S51ryPmTu0hw@mail.gmail.com>

On Wed 04-01-17 11:57:04, Amir Goldstein wrote:
> On Wed, Jan 4, 2017 at 10:28 AM, Jan Kara <jack@suse.cz> wrote:
> > However one thing that may be worth cleaning up is that
> > fanotify_should_send_event() needlessly checks the masks - send to group
> > already did this. So I'd move the check for FS_EVENT_ON_CHILD from
> > fanotify_should_send_event() to send_to_group() - arguably it belongs there
> > - and then just completely drop checking of the masks from
> > fanotify_should_send_event(). What do you think?
> >
> 
> Right, so patch [1/4] plus deduplicating the tests in
> fanotify_should_send_event().
> In principle it makes sense. However, you probably noticed that the logic used
> by fanotify_should_send_event() for FS_EVENT_ON_CHILD is different from
> the generic logic in send_to_group().

Yeah, and my head spins when I try to think how the checks in those two
places actually interact - one more reason to check masks only in one place
:).

> The test in fanotify_should_send_event() is skipped if both inode and vfsmount
> marks are present. My patch [1/4] changes this logic, because I thought it was
> a bug, but my tests indicate that a bug related to FS_EVENT_ON_CHILD exists
> before AND after my change.
> 
> So first, I need to isolate and analyse the bug. When I propose a fix, I will
> make sure the FS_EVENT_ON_CHILD test ends up only in send_to_group().

Thanks!

> >> 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.
> >
> > That would be certainly worthwhile. Actually when I find some useful
> > testcase I add it to LTP under the
> > testcases/kernel/syscalls/{fanotify|inotify}. So please extend that if you
> > have some more ideas for testcases.
> >
> 
> Yes, I am aware of those testcases.
> I find LTP quite heavy to build, so I though I would spin a dedicated
> testsuite that will contain your testcases, but will also include
> infrastructure for stress testing and profiling.
> Keeping track of performance regressions is clearly a major aspect
> of maintaining fsnotify.

Yeah, I don't build full LTP, just testcases in those two directories. The
advantage of LTP is that quite a few people run it so you get a decent test
coverage on different systems (and I've got reports from people running LTP
about regressions in fsnotify code). So I'd prefer to have the functional
tests in LTP if reasonably feasible. But with respect to performance
testing or some crazy stress tests which take long to execute I can definitely
see space for a dedicated test suite.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2017-01-04 10:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-01-04 10:45       ` Amir Goldstein
2017-01-04 11:47         ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170104103958.GN3780@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=amir73il@gmail.com \
    --cc=eparis@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).