xfs
[Top] [All Lists]

Inode lockdep problem observed on 2.6.37.6 xfs with RT subvolume

To: xfs@xxxxxxxxxxx
Subject: Inode lockdep problem observed on 2.6.37.6 xfs with RT subvolume
From: Kamal Dasu <kdasu.kdev@xxxxxxxxx>
Date: Wed, 1 Feb 2012 19:44:13 -0500
Cc: cernekee@xxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=iX6SaFmQ7tf4Pl6F63CvNoaFpW/6jo7W6gOWDivtBfs=; b=tbazOT2QcCU3NP21bh0B+bAQZOKWSrTRO4u5E9eikEvOYihcMMhnTewNqGzrzVuZh/ 63gTFOmE+8LcXl1D5zeZUqS8ZX7oIwqtDxjHdn7ruPuDxYBpivLGxyUD3H0sezm5DVUe nuRBOLC39fitL3z/dWa32H8q0QBAV+Mk0dRGE=
Need some help understanding the state of xfs with rt subvolume
support on 2.6.37.

When using xfs rt subvolume on a harddisk partition with kernel
2.6.37.6,and normal r/w/delete file operations  causes deadlock
like hangs .  Failure  symptoms are lockups and mount failure on reboot.

On further investigation it was found that one of the changes could be
the cause.
The same tests seem to pass with xfs in 2.6.31 kernel.

xfs: simplify xfs_trans_iget  : aa72a5cf00001d0b952c7c755be404b9118ceb2e
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commitdiff;h=aa72a5cf00001d0b952c7c755be404b9118ceb2e

Reverting the change and forward porting to the xfs_trans_inode() seems to
get rid of the deadlock and mount issues .

Below is the change

Signed-off-by: Kamal Dasu <kdasu.kdev@xxxxxxxxx>
---
 linux-2.6.37/fs/xfs/xfs_trans_inode.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/linux-2.6.37/fs/xfs/xfs_trans_inode.c
b/linux-2.6.37/fs/xfs/xfs_trans_inode.c
index ccb3453..c2861d5 100644
--- a/stblinux-2.6.37/fs/xfs/xfs_trans_inode.c
+++ b/stblinux-2.6.37/fs/xfs/xfs_trans_inode.c
@@ -56,6 +56,27 @@ xfs_trans_iget(
        xfs_inode_t     **ipp)
 {
        int                     error;
+       xfs_inode_t     *ip = NULL;
+       xfs_perag_t     *pag = NULL;
+
+       /*
+       * If we find the inode in core with this transaction
+       * pointer in its i_transp field, then we know we already
+       * have it locked.
+       */
+       if(tp != NULL) {
+               pag = xfs_perag_get(mp,  XFS_INO_TO_AGNO(mp, ino));
+               read_lock(&pag->pag_ici_lock);
+               ip = radix_tree_lookup(&pag->pag_ici_root,
XFS_INO_TO_AGNO(mp, ino));
+               read_unlock(&pag->pag_ici_lock);
+               xfs_perag_put(pag);
+       }
+
+       /* the returned inode must match the transaction */
+       if (ip && (ip->i_transp == tp)) {
+               *ipp = ip;
+               return 0;
+       }

        error = xfs_iget(mp, tp, ino, flags, lock_flags, ipp);
        if (!error && tp) {
--
1.7.6

I have also attached the xfs_logprint text output when the mount fails.

Regards
Kamal

Attachment: xfslog-2.6.37.6-mount-fail.txt
Description: Text document

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