[PATCH, realtime-rmap branch] xfs: lock the RT bitmap inode in xfs_efi_item_recover

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



xfs_trans_free_extent expects the rtbitmap and rtsum inodes to be locked.
Ensure that is the case during log recovery as well.

Fixes: 3ea32f5cc5f9 ("xfs: support logging EFIs for realtime extents")
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---

I found this when testing the realtime-rmap branch with additional
patches on top.  Probably makes sense to just fold it in for the next
rebase of that branch.

 fs/xfs/xfs_extfree_item.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index 5b3e7dca4e1ba0..070070b6401d66 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -768,6 +768,8 @@ xfs_efi_item_recover(
 
 		if (!requeue_only) {
 			xfs_extent_free_get_group(mp, &fake);
+			if (xfs_efi_is_realtime(&fake))
+				xfs_rtbitmap_lock(tp, mp);
 			error = xfs_trans_free_extent(tp, efdp, &fake);
 			xfs_extent_free_put_group(&fake);
 		}
-- 
2.39.2




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux