From: viro@parcelfarce.linux.theplanet.co.uk
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] First casuality of hlist poisoning in 2.5.70
Date: Thu, 12 Jun 2003 17:26:27 +0100 [thread overview]
Message-ID: <20030612162627.GJ6754@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0306112206430.29133-100000@home.transmeta.com>
On Wed, Jun 11, 2003 at 10:22:25PM -0700, Linus Torvalds wrote:
> HOWEVER, I actually suspect that the target really _cannot_ be unhashed,
> and that the test makes no sense, and the sequence should just be
>
> /* Rehash the dentry onto the same hash as the target */
> hlist_del_rcu(&dentry->d_hash);
> hlist_add_head_rcu(&dentry->d_hash, target->d_bucket);
> dentry->d_vfs_flags &= ~DCACHE_UNHASHED;
> But I suspect that neither dentry nor target should really ever be
> unhashed by the time we call d_move(). That's reinforced by the fact that
> it looks like a unhashed dentry in d_move() would have been a silent bug
> previously - staying unhashed if it just shared the bucket.
> Al, I'll be really happy having you go over this code too. And whatever we
> decide is right (enforcing hashedness or whatever), we should assert it,
> because clearly d_move() has been a bit too subtle for us so far.
Sigh... The real problem is not in d_move(), but in the way NFS drops
dentries. That, and the fact that we are eating the consequences of
RCU use in dcache - it had predictably made the entire thing _far_ too
subtle.
We probably should accept that both d_move() arguments can be unhashed.
After the move hashed status of source should remain as it is and
victim^Wtarget should get unhashed.
We _do_ need to sort out the situation with unhashing stuff in NFS - in
particular, the way it deals with mountpoints and with directories is
a mess. I'm looking through that code, but it's bloody slow analysis
due to RCU. Premature optimizations and all such...
next prev parent reply other threads:[~2003-06-12 16:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-11 23:34 Trond Myklebust
2003-06-11 23:50 ` Linus Torvalds
2003-06-12 0:04 ` Trond Myklebust
2003-06-12 0:32 ` Linus Torvalds
2003-06-12 5:22 ` Linus Torvalds
2003-06-12 6:04 ` Trond Myklebust
2003-06-12 7:30 ` Trond Myklebust
2003-06-12 16:26 ` viro [this message]
2003-06-19 23:01 ` Paul E. McKenney
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=20030612162627.GJ6754@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=trond.myklebust@fys.uio.no \
/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
all inboxes | Powered by JetHome®