]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: convert rt bitmap/summary block numbers to xfs_fileoff_t
authorDarrick J. Wong <djwong@kernel.org>
Mon, 12 Feb 2024 14:14:20 +0000 (15:14 +0100)
committerCarlos Maiolino <cem@kernel.org>
Thu, 15 Feb 2024 11:56:43 +0000 (12:56 +0100)
Source kernel commit: 03f4de332e2e79db36ed2156fb2350480f142bec

We should use xfs_fileoff_t to store the file block offset of any
location within the realtime bitmap or summary files.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_rtbitmap.c
libxfs/xfs_rtbitmap.h

index 976b1aca6903381545ec2f3c5bede31fdd02da49..9a9097edd0f311b3ea972dd3a90fb54554251b77 100644 (file)
@@ -53,7 +53,7 @@ int
 xfs_rtbuf_get(
        xfs_mount_t     *mp,            /* file system mount structure */
        xfs_trans_t     *tp,            /* transaction pointer */
-       xfs_rtblock_t   block,          /* block number in bitmap or summary */
+       xfs_fileoff_t   block,          /* block number in bitmap or summary */
        int             issum,          /* is summary not bitmap */
        struct xfs_buf  **bpp)          /* output: buffer for the block */
 {
@@ -99,7 +99,7 @@ xfs_rtfind_back(
 {
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
-       xfs_rtblock_t   block;          /* bitmap block number */
+       xfs_fileoff_t   block;          /* bitmap block number */
        struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
@@ -274,7 +274,7 @@ xfs_rtfind_forw(
 {
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
-       xfs_rtblock_t   block;          /* bitmap block number */
+       xfs_fileoff_t   block;          /* bitmap block number */
        struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
@@ -444,15 +444,15 @@ xfs_rtmodify_summary_int(
        xfs_mount_t     *mp,            /* file system mount structure */
        xfs_trans_t     *tp,            /* transaction pointer */
        int             log,            /* log2 of extent size */
-       xfs_rtblock_t   bbno,           /* bitmap block number */
+       xfs_fileoff_t   bbno,           /* bitmap block number */
        int             delta,          /* change to make to summary info */
        struct xfs_buf  **rbpp,         /* in/out: summary block buffer */
-       xfs_fsblock_t   *rsb,           /* in/out: summary block number */
+       xfs_fileoff_t   *rsb,           /* in/out: summary block number */
        xfs_suminfo_t   *sum)           /* out: summary info for this block */
 {
        struct xfs_buf  *bp;            /* buffer for the summary block */
        int             error;          /* error value */
-       xfs_fsblock_t   sb;             /* summary fsblock */
+       xfs_fileoff_t   sb;             /* summary fsblock */
        int             so;             /* index into the summary file */
        xfs_suminfo_t   *sp;            /* pointer to returned data */
 
@@ -514,10 +514,10 @@ xfs_rtmodify_summary(
        xfs_mount_t     *mp,            /* file system mount structure */
        xfs_trans_t     *tp,            /* transaction pointer */
        int             log,            /* log2 of extent size */
-       xfs_rtblock_t   bbno,           /* bitmap block number */
+       xfs_fileoff_t   bbno,           /* bitmap block number */
        int             delta,          /* change to make to summary info */
        struct xfs_buf  **rbpp,         /* in/out: summary block buffer */
-       xfs_fsblock_t   *rsb)           /* in/out: summary block number */
+       xfs_fileoff_t   *rsb)           /* in/out: summary block number */
 {
        return xfs_rtmodify_summary_int(mp, tp, log, bbno,
                                        delta, rbpp, rsb, NULL);
@@ -537,7 +537,7 @@ xfs_rtmodify_range(
 {
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
-       xfs_rtblock_t   block;          /* bitmap block number */
+       xfs_fileoff_t   block;          /* bitmap block number */
        struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
@@ -690,7 +690,7 @@ xfs_rtfree_range(
        xfs_rtblock_t   start,          /* starting block to free */
        xfs_rtxlen_t    len,            /* length to free */
        struct xfs_buf  **rbpp,         /* in/out: summary block buffer */
-       xfs_fsblock_t   *rsb)           /* in/out: summary block number */
+       xfs_fileoff_t   *rsb)           /* in/out: summary block number */
 {
        xfs_rtblock_t   end;            /* end of the freed extent */
        int             error;          /* error value */
@@ -771,7 +771,7 @@ xfs_rtcheck_range(
 {
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
-       xfs_rtblock_t   block;          /* bitmap block number */
+       xfs_fileoff_t   block;          /* bitmap block number */
        struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
index d4449610154a8ef892cce084bf5f9f40217f2c23..e2ea6d31c38b1cd7bf2a7d6a5c6ba706eb1f1fd8 100644 (file)
@@ -24,7 +24,7 @@ typedef int (*xfs_rtalloc_query_range_fn)(
 
 #ifdef CONFIG_XFS_RT
 int xfs_rtbuf_get(struct xfs_mount *mp, struct xfs_trans *tp,
-                 xfs_rtblock_t block, int issum, struct xfs_buf **bpp);
+                 xfs_fileoff_t block, int issum, struct xfs_buf **bpp);
 int xfs_rtcheck_range(struct xfs_mount *mp, struct xfs_trans *tp,
                      xfs_rtblock_t start, xfs_rtxlen_t len, int val,
                      xfs_rtblock_t *new, int *stat);
@@ -37,15 +37,15 @@ int xfs_rtfind_forw(struct xfs_mount *mp, struct xfs_trans *tp,
 int xfs_rtmodify_range(struct xfs_mount *mp, struct xfs_trans *tp,
                       xfs_rtblock_t start, xfs_rtxlen_t len, int val);
 int xfs_rtmodify_summary_int(struct xfs_mount *mp, struct xfs_trans *tp,
-                            int log, xfs_rtblock_t bbno, int delta,
-                            struct xfs_buf **rbpp, xfs_fsblock_t *rsb,
+                            int log, xfs_fileoff_t bbno, int delta,
+                            struct xfs_buf **rbpp, xfs_fileoff_t *rsb,
                             xfs_suminfo_t *sum);
 int xfs_rtmodify_summary(struct xfs_mount *mp, struct xfs_trans *tp, int log,
-                        xfs_rtblock_t bbno, int delta, struct xfs_buf **rbpp,
-                        xfs_fsblock_t *rsb);
+                        xfs_fileoff_t bbno, int delta, struct xfs_buf **rbpp,
+                        xfs_fileoff_t *rsb);
 int xfs_rtfree_range(struct xfs_mount *mp, struct xfs_trans *tp,
                     xfs_rtblock_t start, xfs_rtxlen_t len,
-                    struct xfs_buf **rbpp, xfs_fsblock_t *rsb);
+                    struct xfs_buf **rbpp, xfs_fileoff_t *rsb);
 int xfs_rtalloc_query_range(struct xfs_mount *mp, struct xfs_trans *tp,
                const struct xfs_rtalloc_rec *low_rec,
                const struct xfs_rtalloc_rec *high_rec,