[PATCH 1/4] xfs: only lock the rt bitmap inode once per allocation
kdasu
kdasu.kdev at gmail.com
Fri Feb 17 16:51:15 CST 2012
Currently both xfs_rtpick_extent and xfs_rtallocate_extent call
xfs_trans_iget to grab and lock the rt bitmap inode, which results in a
deadlock since the removal of the lock recursion counters in commit
"xfs: simplify inode to transaction joining"
Fix this by acquiring and locking the inode in xfs_bmap_rtalloc before
calling into xfs_rtpick_extent and xfs_rtallocate_extent.
Signed-off-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Alex Elder <aelder at sgi.com>
Signed-off-by: Kamal Dasu <kdasu.kdev at gmail.com>
---
fs/xfs/xfs_bmap.c | 11 +++++++++++
fs/xfs/xfs_rtalloc.c | 34 +++++++++++++---------------------
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 4111cd3..9d9970b 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -2316,6 +2316,7 @@ xfs_bmap_rtalloc(
xfs_extlen_t prod = 0; /* product factor for allocators */
xfs_extlen_t ralen = 0; /* realtime allocation length */
xfs_extlen_t align; /* minimum allocation alignment */
+ xfs_inode_t *ip; /* bitmap incore inode */
xfs_rtblock_t rtb;
kdasu at kdasu-VirtualBox:~/linux-2.6$ more
0001-xfs-only-lock-the-rt-bitmap-inode-once-per-allocatio.patch
More information about the xfs
mailing list