diff mbox series

[1/1] xfs: add a realtime flag to the bmap update log redo items

Message ID 171142133677.2218014.4422121913066180413.stgit@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series [1/1] xfs: add a realtime flag to the bmap update log redo items | expand

Commit Message

Darrick J. Wong March 26, 2024, 3:58 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Extend the bmap update (BUI) log items with a new realtime flag that
indicates that the updates apply against a realtime file's data fork.
We'll wire up the actual code later.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 libxfs/defer_item.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Christoph Hellwig March 26, 2024, 5:42 a.m. UTC | #1
On Mon, Mar 25, 2024 at 08:58:26PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Extend the bmap update (BUI) log items with a new realtime flag that
> indicates that the updates apply against a realtime file's data fork.
> We'll wire up the actual code later.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/libxfs/defer_item.c b/libxfs/defer_item.c
index fdb922f08c39..21dd1d0f416e 100644
--- a/libxfs/defer_item.c
+++ b/libxfs/defer_item.c
@@ -490,6 +490,9 @@  xfs_bmap_update_get_group(
 {
 	xfs_agnumber_t		agno;
 
+	if (xfs_ifork_is_realtime(bi->bi_owner, bi->bi_whichfork))
+		return;
+
 	agno = XFS_FSB_TO_AGNO(mp, bi->bi_bmap.br_startblock);
 
 	/*
@@ -519,10 +522,13 @@  static inline void
 xfs_bmap_update_put_group(
 	struct xfs_bmap_intent	*bi)
 {
+	if (xfs_ifork_is_realtime(bi->bi_owner, bi->bi_whichfork))
+		return;
+
 	xfs_perag_intent_put(bi->bi_pag);
 }
 
-/* Cancel a deferred rmap update. */
+/* Cancel a deferred bmap update. */
 STATIC void
 xfs_bmap_update_cancel_item(
 	struct list_head		*item)