public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: provide a inode iolock lockdep class
Date: Wed, 15 Dec 2010 07:18:11 -0500	[thread overview]
Message-ID: <20101215121811.GA3122@infradead.org> (raw)
In-Reply-To: <1292202431-15320-1-git-send-email-david@fromorbit.com>

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.


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

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

  reply	other threads:[~2010-12-15 12:16 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 [this message]
2010-12-15 22:57   ` Dave Chinner

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=20101215121811.GA3122@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --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