public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: kdasu <kdasu.kdev@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 4/4] xfs: fix deadlock in xfs_rtfree_extent with kernel v2.6.37
Date: Sun, 19 Feb 2012 17:41:18 -0500	[thread overview]
Message-ID: <20120219224118.GA31535@infradead.org> (raw)
In-Reply-To: <33346051.post@talk.nabble.com>

On Fri, Feb 17, 2012 at 03:00:09PM -0800, kdasu wrote:
> 
> 
> On the 2.6.37 kernel, xfs_fs_evict_inode() leads to a deadlock when
> freeing multiple realtime extents. On further debugging the root
> cause it was determined to be recursive locking of the RT bitmap
> inode during evict operation within the same task context.
> The same vfs evict sequence is replayed by the xfs log recovery on
> mounts on a reboot after the problem happens first time.
> This problem exists on kernel v2.6.39 as well.

I think you're better off fixing this problem like I did for the
allocation side, that is:

 - remove the xfs_ilock and xfs_trans_ijoin (or probably still
   xfs_trans_iget in your version) from xfs_rtfree_extent, and
   instead add asserts that the inode is locked and has an inode_item
   attach to it.
 - in xfs_bunmapi if we are dealing with an inode with the rt flag
   bump the reference count on the inode there and attach it to the
   transaction before calling into xfs_bmap_del_extent, similar to
   what we do in xfs_bmap_rtalloc.

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

  reply	other threads:[~2012-02-19 22:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 22:46 [PATCH 0/4] xfs: resurrect realtime subvolume support on kernel 2.6.37 kdasu
2012-02-17 22:51 ` [PATCH 1/4] xfs: only lock the rt bitmap inode once per allocation kdasu
2012-02-17 22:55   ` [PATCH 2/4] xfs: fix xfs_get_extsz_hint for a zero extent size hint kdasu
2012-02-17 22:58     ` [PATCH 3/4] xfs: add lockdep annotations for the rt inodes kdasu
2012-02-17 23:00       ` [PATCH 4/4] xfs: fix deadlock in xfs_rtfree_extent with kernel v2.6.37 kdasu
2012-02-19 22:41         ` Christoph Hellwig [this message]
2012-02-21 17:22           ` Kamal Dasu
2012-02-23 16:52             ` [PATCH 4/4] V2 " Kamal Dasu
2012-02-25  9:40               ` Christoph Hellwig
2012-02-25 15:46                 ` Kamal Dasu
2012-02-28  8:36                   ` Christoph Hellwig

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=20120219224118.GA31535@infradead.org \
    --to=hch@infradead.org \
    --cc=kdasu.kdev@gmail.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