linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>, LKP <lkp@01.org>
Subject: Re: [PATCH] fsnotify: fix unlink performance regression
Date: Mon, 6 May 2019 15:26:41 +0100	[thread overview]
Message-ID: <20190506142641.GD23075@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAOQ4uxhY0WmA7bTHhBXJLery2NmLKb_kGxoQY-hae3CrBA2sXQ@mail.gmail.com>

On Mon, May 06, 2019 at 03:43:24PM +0300, Amir Goldstein wrote:
> OK. What do you have to say about this statement?
> 
>     Because fsnotify_nameremove() is called from d_delete() with negative
>     or unhashed dentry, d_move() is not expected on this dentry, so it is
>     safe to use d_parent/d_name without take_dentry_name_snapshot().
> 
> I assume it is not correct, but cannot figure out why.
> Under what circumstances is d_move() expected to move an unhashed
> dentry and hash it?

For starters, d_splice_alias() picking an exising alias for given directory
inode.

> My other thought is why is fsnotify_nameremove() in d_delete() and
> not in vfs_unlink()/vfs_rmdir() under parent inode lock like the rest
> of the fsnotify_create/fsnotify_move hooks?
> 
> In what case would we need the fsnotify event that is not coming
> from vfs_unlink()/vfs_rmdir()?

*snort*

You can thank those who whine about notifications on sysfs/devpts/whatnot.
Go talk to them if you wish, but don't ask me to translate what you'll get
into something coherent - I'd never been able to.

  reply	other threads:[~2019-05-06 14:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-05  9:15 [PATCH] fsnotify: fix unlink performance regression Amir Goldstein
2019-05-05 13:05 ` Al Viro
2019-05-05 13:19   ` Amir Goldstein
2019-05-05 13:47     ` Al Viro
2019-05-05 14:18       ` Amir Goldstein
2019-05-06 12:43       ` Amir Goldstein
2019-05-06 14:26         ` Al Viro [this message]
2019-05-06 16:22           ` Amir Goldstein
2019-05-05 16:33 ` kbuild test robot
2019-05-05 18:26   ` Amir Goldstein
2019-05-05 20:07     ` [PATCH v2] " Amir Goldstein
2019-05-07 16:19       ` Jan Kara
2019-05-07 19:12         ` Amir Goldstein
2019-05-08 16:09           ` Amir Goldstein
2019-05-09 10:31             ` Jan Kara
2019-05-10 15:24               ` Amir Goldstein
2019-05-13 16:33                 ` Jan Kara
2019-05-13 16:47                   ` Amir Goldstein
2019-05-09  9:46           ` Jan Kara
2019-05-10 14:57             ` Amir Goldstein
2019-05-13 16:23               ` 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=20190506142641.GD23075@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=amir73il@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=torvalds@linux-foundation.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).