From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, Nick Piggin <npiggin@kernel.dk>,
xfs@oss.sgi.com
Subject: Re: XFS reclaim lock order bug
Date: Thu, 25 Nov 2010 12:37:37 +0100 [thread overview]
Message-ID: <1290685057.2145.33.camel@laptop> (raw)
In-Reply-To: <20101125112530.GB4195@infradead.org>
On Thu, 2010-11-25 at 06:25 -0500, Christoph Hellwig wrote:
> On Thu, Nov 25, 2010 at 09:29:40PM +1100, Dave Chinner wrote:
> > Yes, actually it is - see the XFS_IRECLAIMABLE case in
> > xfs_iget_cache_hit(). I guess we haven't seen the original lock
> > inversion false positives that this was supposed to fix because the
> > reclaim warnings trip first...
> >
> > I think that means we also need to reinitialise the lock when we recycle
> > the inode out of the XFS_IRECLAIMABLE state.
>
> I came up with the patch below when we had a previous report of the
> warning, but I couldn't convince myself that it really helps:
>
> Index: linux-2.6/fs/xfs/xfs_iget.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/xfs_iget.c 2010-09-20 12:10:28.227444173 -0300
> +++ linux-2.6/fs/xfs/xfs_iget.c 2010-09-20 12:11:25.631444190 -0300
> @@ -207,6 +207,10 @@ xfs_iget_cache_hit(
>
> ip->i_flags &= ~XFS_INEW;
> ip->i_flags |= XFS_IRECLAIMABLE;
> +
> + ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
> + mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
> +
> __xfs_inode_set_reclaim_tag(pag, ip);
> trace_xfs_iget_reclaim_fail(ip);
> goto out_error;
That adds a 3rd class which should work, but doesn't validate that the
first -- xfs_inode_alloc() and this one are in fact similar.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2010-11-25 11:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 12:18 XFS reclaim lock order bug Nick Piggin
2010-11-23 21:12 ` Dave Chinner
2010-11-24 0:58 ` Nick Piggin
2010-11-24 2:26 ` Dave Chinner
2010-11-24 20:03 ` Christoph Hellwig
2010-11-25 3:48 ` Nick Piggin
2010-11-25 6:25 ` Peter Zijlstra
2010-11-25 7:08 ` Nick Piggin
2010-11-25 7:28 ` Peter Zijlstra
2010-11-25 10:32 ` Dave Chinner
2010-11-25 10:29 ` Dave Chinner
2010-11-25 10:36 ` Peter Zijlstra
2010-11-25 11:25 ` Christoph Hellwig
2010-11-25 11:37 ` Peter Zijlstra [this message]
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=1290685057.2145.33.camel@laptop \
--to=peterz@infradead.org \
--cc=hch@infradead.org \
--cc=mingo@redhat.com \
--cc=npiggin@kernel.dk \
--cc=xfs@oss.sgi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.