public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: provide a inode iolock lockdep class
Date: Thu, 16 Dec 2010 09:57:10 +1100	[thread overview]
Message-ID: <20101215225710.GG9925@dastard> (raw)
In-Reply-To: <20101215121811.GA3122@infradead.org>

On Wed, Dec 15, 2010 at 07:18:11AM -0500, Christoph Hellwig wrote:
> On Mon, Dec 13, 2010 at 12:07:11PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > The XFS iolock needs to be re-initialised to a new lock class before
> > it enters reclaim to prevent lockdep false positives. Unfortunately,
> > this is not sufficient protection as inodes in the XFS_IRECLAIMABLE
> > state can be recycled and not re-initialised before being reused.
> > 
> > We need to re-initialise the lock state when transfering out of
> > XFS_IRECLAIMABLE state to XFS_INEW, but we need to keep the same
> > class as if the inode was just allocated. Hence we need a specific
> > lockdep class variable for the iolock so that both initialisations
> > use the same class.
> > 
> > While there, add a specific class for inodes in the reclaim state so
> > that it is easy to tell from lockdep reports what state the inode
> > was in that generated the report.
> 
> Looks good to me.  As long as we have the mrlock abstraction we might as
> well hide this behind it, but as I plan on killing the abstraction
> that's probably not worth the effort.

I thought about doing that, too, after looking at what the abstraction
still provides us with. I think it only provides an extra "is write
locked" debug check which I think could be added to the generic
rwsem code pretty easily. But I've got a big enough patch stack out
for review right now. ;)

> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks, I'll add it to the for-2.6.38 stack.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2010-12-15 22:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13  1:07 [PATCH] xfs: provide a inode iolock lockdep class Dave Chinner
2010-12-15 12:18 ` Christoph Hellwig
2010-12-15 22:57   ` Dave Chinner [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=20101215225710.GG9925@dastard \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox