summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rtalloc.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-10-16 19:31:11 +0300
committerDarrick J. Wong <djwong@kernel.org>2023-10-18 02:24:22 +0300
commita684c538bc14410565e8939393089670fa1e19dd (patch)
treee94ddb75372a96b28b4d0c84d4f19fe8579650a9 /fs/xfs/xfs_rtalloc.h
parent13928113fc5b5e79c91796290a99ed991ac0efe2 (diff)
downloadlinux-a684c538bc14410565e8939393089670fa1e19dd.tar.xz
xfs: convert xfs_extlen_t to xfs_rtxlen_t in the rt allocator
In most of the filesystem, we use xfs_extlen_t to store the length of a file (or AG) space mapping in units of fs blocks. Unfortunately, the realtime allocator also uses it to store the length of a rt space mapping in units of rt extents. This is confusing, since one rt extent can consist of many fs blocks. Separate the two by introducing a new type (xfs_rtxlen_t) to store the length of a space mapping (in units of realtime extents) that would be found in a file. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.h')
-rw-r--r--fs/xfs/xfs_rtalloc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h
index 11859c259a1c..24a4a1321de0 100644
--- a/fs/xfs/xfs_rtalloc.h
+++ b/fs/xfs/xfs_rtalloc.h
@@ -25,11 +25,11 @@ int /* error */
xfs_rtallocate_extent(
struct xfs_trans *tp, /* transaction pointer */
xfs_rtblock_t bno, /* starting block number to allocate */
- xfs_extlen_t minlen, /* minimum length to allocate */
- xfs_extlen_t maxlen, /* maximum length to allocate */
- xfs_extlen_t *len, /* out: actual length allocated */
+ xfs_rtxlen_t minlen, /* minimum length to allocate */
+ xfs_rtxlen_t maxlen, /* maximum length to allocate */
+ xfs_rtxlen_t *len, /* out: actual length allocated */
int wasdel, /* was a delayed allocation extent */
- xfs_extlen_t prod, /* extent product factor */
+ xfs_rtxlen_t prod, /* extent product factor */
xfs_rtblock_t *rtblock); /* out: start block allocated */
@@ -62,7 +62,7 @@ int /* error */
xfs_rtpick_extent(
struct xfs_mount *mp, /* file system mount point */
struct xfs_trans *tp, /* transaction pointer */
- xfs_extlen_t len, /* allocation length (rtextents) */
+ xfs_rtxlen_t len, /* allocation length (rtextents) */
xfs_rtblock_t *pick); /* result rt extent */
/*