[Top] [All Lists]

Re: 2.6.30-rc4: xfs_fsr hangs

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: 2.6.30-rc4: xfs_fsr hangs
From: Felix Blyakher <felixb@xxxxxxx>
Date: Thu, 7 May 2009 20:17:49 -0500
Cc: Alexander Beregalov <a.beregalov@xxxxxxxxx>, Kernel Testers List <kernel-testers@xxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <4A038651.5010202@xxxxxxxxxxx>
References: <a4423d670905011333s664115bdh1d72392897567c1d@xxxxxxxxxxxxxx> <4A036FBC.9020201@xxxxxxxxxxx> <4A037503.1070904@xxxxxxxxxxx> <ABCCDF18-5100-4891-AF1C-BA9513C8A334@xxxxxxx> <4A038651.5010202@xxxxxxxxxxx>

On May 7, 2009, at 8:09 PM, Eric Sandeen wrote:

Felix Blyakher wrote:

I've been chasing this as well, and I found the double xfs iolock
unlock which is causing xfs_fsr deadlock itself. I have a fix tested.
The patch is coming.


Oh :)  I just sent this one to the list ...  :)

Oh :) And I did as well.

And guess what, the fix is exactly the same.
Great minds think alike :)


XFS: Fix double unlock of inodes in xfs_swap_extents()

commit ef8f7fc549bf345d92f396f5aa7b152b4969cbf7 had an error
where we would try to re-unlock the inodes after they had been
committed in the transaction; this double unlock caused a

[ BUG: bad unlock balance detected! ]
xfs_fsr/1459 is trying to release lock (&(&ip->i_iolock)->mr_lock) at:
[<e248dedb>] xfs_iunlock+0x2c/0x92 [xfs]
but there are no more locks to release!

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

Index: linux-2.6/fs/xfs/xfs_dfrag.c
--- linux-2.6.orig/fs/xfs/xfs_dfrag.c
+++ linux-2.6/fs/xfs/xfs_dfrag.c
@@ -347,13 +347,15 @@ xfs_swap_extents(

        error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);

-       xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-       xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
        return error;

+       xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       goto out;
        xfs_trans_cancel(tp, 0);
        goto out_unlock;

To unsubscribe from this list: send the line "unsubscribe linux- kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

<Prev in Thread] Current Thread [Next in Thread>