From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Jones <davej@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Miklos Szeredi <mszeredi@suse.cz>, Jan Kara <jack@suse.cz>,
Peter Zijlstra <peterz@infradead.org>,
linux-fsdevel@vger.kernel.org,
"J. Bruce Fields" <bfields@redhat.com>,
Sage Weil <sage@newdream.net>
Subject: Re: processes hung after sys_renameat, and 'missing' processes
Date: Fri, 8 Jun 2012 00:39:09 +0100 [thread overview]
Message-ID: <20120607233909.GJ30000@ZenIV.linux.org.uk> (raw)
In-Reply-To: <873966n2c2.fsf@xmission.com>
On Thu, Jun 07, 2012 at 04:12:45PM -0700, Eric W. Biederman wrote:
> We take the approprate dentry locks in the approparite order so d_move
> and the dcache should not care in the slightest about the inode
> mutecies.
>
> If we need the inode mutecies to make the dcache bits safe then
> something really is insane. There may be subtle insanities in the
> vfs that require the inode muticies of the parents in d_move but I am
> certainly not seeing them. At least as I read it the code in __d_move
> only touches and modifies dentry fields.
Yes. Now, go take a look at e.g. the locking order on ->d_lock. No,
I'm not saying that I like it. Not at all. But we do rely on the
non-local protections for tree topology, just to make sure that the
damn thing has the locking order consistent - not changing between
the moments you take locks you've ordered, for starters.
I realize that "serialize all operations on a single per-machine mutex" is a
solution. It's just not something feasible when we are talking about all
directory tree modifications on a general-purpose filesystem. So no,
sysfs approach to that kind of problems is not usable here.
I doubt that we have something sysfs-related in the deadlocks davej is seeing,
but I seriously suspect that I can cook one based on sysfs_rename() setting
the things up for silent topology changes on ->lookup(). I would suggest
using d_materialise_unique() there - that one *does* take care to take
locks needed.
BTW, looking at the code in sysfs_lookup()... why bother with d_set_d_op()
instead of just sb->s_d_op = &sysfs_dentry_ops; once during sysfs_fill_super()?
In the worst case you need to do that after you've allocated the root
dentry, depending on whether you are willing or not to make ->d_revalidate()
return 1 whenever it's called on the root dentry...
next prev parent reply other threads:[~2012-06-07 23:39 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-03 22:36 processes hung after sys_renameat, and 'missing' processes Dave Jones
2012-06-03 22:51 ` Dave Jones
2012-06-03 23:07 ` Linus Torvalds
2012-06-03 23:17 ` Al Viro
2012-06-03 23:28 ` Al Viro
2012-06-03 23:40 ` Al Viro
2012-06-03 23:59 ` Al Viro
2012-06-04 0:07 ` Dave Jones
2012-06-06 19:42 ` Dave Jones
2012-06-06 22:38 ` Linus Torvalds
2012-06-06 23:00 ` Dave Jones
2012-06-06 23:31 ` Linus Torvalds
2012-06-06 23:54 ` Al Viro
2012-06-07 0:29 ` Dave Jones
2012-06-07 0:40 ` Al Viro
2012-06-07 0:42 ` Linus Torvalds
2012-06-07 1:19 ` Dave Jones
2012-06-07 1:29 ` Al Viro
2012-06-07 1:31 ` Dave Jones
2012-06-07 1:31 ` Al Viro
2012-06-07 1:42 ` Dave Jones
2012-06-07 1:45 ` Linus Torvalds
2012-06-07 1:54 ` Al Viro
2012-06-07 2:08 ` Dave Jones
2012-06-07 19:36 ` Al Viro
2012-06-07 20:43 ` Sage Weil
2012-06-07 23:12 ` Eric W. Biederman
2012-06-07 23:39 ` Al Viro [this message]
2012-06-07 23:57 ` Linus Torvalds
2012-06-08 0:36 ` Al Viro
2012-06-08 0:42 ` Linus Torvalds
2012-06-08 0:59 ` Al Viro
2012-06-08 5:25 ` Eric W. Biederman
2012-06-08 5:48 ` Al Viro
2012-06-08 7:54 ` Eric W. Biederman
2012-06-08 20:20 ` Al Viro
2012-06-08 2:08 ` Eric W. Biederman
2012-06-08 2:37 ` Al Viro
2012-06-08 2:18 ` Al Viro
2012-06-08 16:22 ` J. Bruce Fields
2012-06-08 17:44 ` Linus Torvalds
2012-06-11 12:17 ` J. Bruce Fields
2012-06-07 1:40 ` Linus Torvalds
2012-06-07 0:35 ` Linus Torvalds
2012-06-07 10:26 ` Peter Zijlstra
2012-06-07 15:30 ` Linus Torvalds
2012-06-08 7:31 ` Peter Zijlstra
2012-06-08 14:38 ` Dave Jones
2012-06-08 14:51 ` Peter Zijlstra
2012-06-08 15:01 ` Dave Jones
2012-06-08 15:11 ` Peter Zijlstra
2012-06-08 15:21 ` Dave Jones
2012-06-08 14:46 ` J. Bruce Fields
2012-06-08 15:08 ` Peter Zijlstra
2012-06-11 12:17 ` J. Bruce Fields
2012-06-04 0:00 ` Dave Jones
2012-06-04 0:16 ` Linus Torvalds
2012-06-04 0:20 ` Al Viro
2012-06-04 9:35 ` Peter Zijlstra
2012-06-04 9:29 ` Peter Zijlstra
2012-06-04 10:49 ` Peter Zijlstra
2012-06-07 0:13 ` Dave Jones
-- strict thread matches above, loose matches on Subject: below --
2012-06-07 7:07 Miklos Szeredi
2012-06-07 15:44 ` Linus Torvalds
2012-06-11 16:02 ` Miklos Szeredi
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=20120607233909.GJ30000@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=bfields@redhat.com \
--cc=davej@redhat.com \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@suse.cz \
--cc=peterz@infradead.org \
--cc=sage@newdream.net \
--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