All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH, realtime-rmap branch] xfs: lock the RT bitmap inode in xfs_efi_item_recover
@ 2023-10-31  9:50 Christoph Hellwig
  2023-10-31 16:47 ` kernel test robot
  2023-10-31 16:53 ` Darrick J. Wong
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2023-10-31  9:50 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs

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@lst.de>
---

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-31 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31  9:50 [PATCH, realtime-rmap branch] xfs: lock the RT bitmap inode in xfs_efi_item_recover Christoph Hellwig
2023-10-31 16:47 ` kernel test robot
2023-10-31 16:53 ` Darrick J. Wong
2023-10-31 17:14   ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.