diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 21:44:23 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 21:44:23 +0100 |
commit | 7302cda7f8b08062b11d2ba9ae0b4f3871fe3d46 (patch) | |
tree | 60dfa44046a655c52a5c93cee9e75da866cc9b0b /fs/xfs/xfs_bmap_item.c | |
parent | xfs: fix xfs_bunmapi to allow unmapping of partial rt extents (diff) | |
download | linux-7302cda7f8b08062b11d2ba9ae0b4f3871fe3d46.tar.xz linux-7302cda7f8b08062b11d2ba9ae0b4f3871fe3d46.zip |
xfs: add a realtime flag to the bmap update log redo items
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_bmap_item.c')
-rw-r--r-- | fs/xfs/xfs_bmap_item.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c index a47cbce36482..701166da7f8a 100644 --- a/fs/xfs/xfs_bmap_item.c +++ b/fs/xfs/xfs_bmap_item.c @@ -275,6 +275,8 @@ xfs_bmap_update_log_item( map->me_flags |= XFS_BMAP_EXTENT_UNWRITTEN; if (bi->bi_whichfork == XFS_ATTR_FORK) map->me_flags |= XFS_BMAP_EXTENT_ATTR_FORK; + if (xfs_ifork_is_realtime(bi->bi_owner, bi->bi_whichfork)) + map->me_flags |= XFS_BMAP_EXTENT_REALTIME; } static struct xfs_log_item * @@ -324,6 +326,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); /* @@ -353,6 +358,9 @@ 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); } |