From: Christoph Hellwig <hch@infradead.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>,
linux-kernel@vger.kernel.org, mingo@redhat.com,
Christoph Hellwig <hch@infradead.org>,
Nick Piggin <nickpiggin@yahoo.com.au>,
linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
swhiteho@redhat.com
Subject: Re: lockdep: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage.
Date: Tue, 19 Jan 2010 13:46:31 -0500 [thread overview]
Message-ID: <20100119184631.GA11408@infradead.org> (raw)
In-Reply-To: <1263559995.4244.403.camel@laptop>
On Fri, Jan 15, 2010 at 01:53:15PM +0100, Peter Zijlstra wrote:
> Well, I don't know enough about xfs (of filesystems in generic) to say
> that with any certainty, but I can imagine inode writeback from the sync
> that goes with umount to cause issues.
>
> If this inode reclaim is past all that and the filesystem is basically
> RO, then I don't think so and this could be considered a false positive,
> in which case we need an annotation for this.
The issue is a bit more complicated. In the unmount case
invalidate_inodes() is indeed called after the filesystem is effectively
read-only for user origination operations. But there's a miriad of
other invalidate_inodes() calls:
- fs/block_dev.c:__invalidate_device()
This gets called from block device codes for various kinds of
invalidations. Doesn't make any sense at all to me, but hey..
- fs/ext2/super.c:ext2_remount()
Appears like it's used to check for activate inodes during
remount. Very fishy usage, and could just be replaced with
a list walk without any I/O
- fs/gfs2/glock.c:gfs2_gl_hash_clear()
No idea.
- fs/gfs2/ops_fstype.c:fill_super()
Tries to kill all inodes in the fill_super error path, looks
very fishy.
- fs/ntfs/super.c:ntfs_fill_super()
Failure case of fill_super again, does not look very useful.A
- fs/smbfs/inode.c:smb_invalidate_inodes()
Used when a connection goes bad.
In short we can't generally rely on this only happening on a dead fs.
But in the end we abuse iprune_sem to work around a ref counting
problem. As long as we keep a reference to the superblock for each
inode on the dispose list the superblock can't go away and there's
no need for the lock at all.
next prev parent reply other threads:[~2010-01-19 18:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 12:02 Dave Chinner
2010-01-15 12:11 ` Peter Zijlstra
2010-01-15 12:44 ` Dave Chinner
2010-01-15 12:53 ` Peter Zijlstra
2010-01-15 13:33 ` Dave Chinner
2010-01-19 18:46 ` Christoph Hellwig [this message]
2010-01-20 10:57 ` Steven Whitehouse
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=20100119184631.GA11408@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nickpiggin@yahoo.com.au \
--cc=peterz@infradead.org \
--cc=swhiteho@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome