All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH, realtime-rmap branch] xfs: lock the RT bitmap inode in xfs_efi_item_recover
Date: Tue, 31 Oct 2023 10:50:38 +0100	[thread overview]
Message-ID: <20231031095038.1559309-1-hch@lst.de> (raw)

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


             reply	other threads:[~2023-10-31  9:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31  9:50 Christoph Hellwig [this message]
2023-10-31 16:47 ` [PATCH, realtime-rmap branch] xfs: lock the RT bitmap inode in xfs_efi_item_recover kernel test robot
2023-10-31 16:53 ` Darrick J. Wong
2023-10-31 17:14   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231031095038.1559309-1-hch@lst.de \
    --to=hch@lst.de \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.