diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-10-16 19:35:23 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-10-18 02:24:22 +0300 |
commit | 2c2b981b737a519907429f62148bbd9e40e01132 (patch) | |
tree | 1927c4278c463d432f3c2ea4c955496cf0a96568 /fs/xfs/xfs_trans.c | |
parent | 68db60bf01c131c09bbe35adf43bd957a4c124bc (diff) | |
download | linux-2c2b981b737a519907429f62148bbd9e40e01132.tar.xz |
xfs: create a helper to convert extlen to rtextlen
Create a helper to compute the realtime extent (xfs_rtxlen_t) from an
extent length (xfs_extlen_t) value.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r-- | fs/xfs/xfs_trans.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index 8c0bfc9a33b1..338dd3774507 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -24,6 +24,7 @@ #include "xfs_dquot_item.h" #include "xfs_dquot.h" #include "xfs_icache.h" +#include "xfs_rtbitmap.h" struct kmem_cache *xfs_trans_cache; @@ -1196,7 +1197,7 @@ xfs_trans_alloc_inode( retry: error = xfs_trans_alloc(mp, resv, dblocks, - rblocks / mp->m_sb.sb_rextsize, + xfs_extlen_to_rtxlen(mp, rblocks), force ? XFS_TRANS_RESERVE : 0, &tp); if (error) return error; |