summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_trans_space.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-15 14:54:17 -0700
committerDarrick J. Wong <djwong@kernel.org>2024-04-15 14:54:17 -0700
commit966ceafc7a437105ecfe1cadb3747b2965a260ca (patch)
tree656b079bc085e63c20833bf07e702481fcefc421 /fs/xfs/libxfs/xfs_trans_space.h
parent6c08f434bd33f88cf169e9e43c7a5e42fb3f2118 (diff)
downloadlinux-stable-966ceafc7a437105ecfe1cadb3747b2965a260ca.tar.gz
linux-stable-966ceafc7a437105ecfe1cadb3747b2965a260ca.tar.bz2
linux-stable-966ceafc7a437105ecfe1cadb3747b2965a260ca.zip
xfs: create deferred log items for file mapping exchanges
Now that we've created the skeleton of a log intent item to track and restart file mapping exchange operations, add the upper level logic to commit intent items and turn them into concrete work recorded in the log. This builds on the existing bmap update intent items that have been around for a while now. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_trans_space.h')
-rw-r--r--fs/xfs/libxfs/xfs_trans_space.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_trans_space.h b/fs/xfs/libxfs/xfs_trans_space.h
index 87b31c69a773..9640fc232c14 100644
--- a/fs/xfs/libxfs/xfs_trans_space.h
+++ b/fs/xfs/libxfs/xfs_trans_space.h
@@ -10,6 +10,10 @@
* Components of space reservations.
*/
+/* Worst case number of bmaps that can be held in a block. */
+#define XFS_MAX_CONTIG_BMAPS_PER_BLOCK(mp) \
+ (((mp)->m_bmap_dmxr[0]) - ((mp)->m_bmap_dmnr[0]))
+
/* Worst case number of rmaps that can be held in a block. */
#define XFS_MAX_CONTIG_RMAPS_PER_BLOCK(mp) \
(((mp)->m_rmap_mxr[0]) - ((mp)->m_rmap_mnr[0]))