Skip to content

Commit 03f4de3

Browse files
author
Darrick J. Wong
committed
xfs: convert rt bitmap/summary block numbers to xfs_fileoff_t
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>
1 parent a684c53 commit 03f4de3

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

fs/xfs/libxfs/xfs_rtbitmap.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int
5555
xfs_rtbuf_get(
5656
xfs_mount_t *mp, /* file system mount structure */
5757
xfs_trans_t *tp, /* transaction pointer */
58-
xfs_rtblock_t block, /* block number in bitmap or summary */
58+
xfs_fileoff_t block, /* block number in bitmap or summary */
5959
int issum, /* is summary not bitmap */
6060
struct xfs_buf **bpp) /* output: buffer for the block */
6161
{
@@ -101,7 +101,7 @@ xfs_rtfind_back(
101101
{
102102
xfs_rtword_t *b; /* current word in buffer */
103103
int bit; /* bit number in the word */
104-
xfs_rtblock_t block; /* bitmap block number */
104+
xfs_fileoff_t block; /* bitmap block number */
105105
struct xfs_buf *bp; /* buf for the block */
106106
xfs_rtword_t *bufp; /* starting word in buffer */
107107
int error; /* error value */
@@ -276,7 +276,7 @@ xfs_rtfind_forw(
276276
{
277277
xfs_rtword_t *b; /* current word in buffer */
278278
int bit; /* bit number in the word */
279-
xfs_rtblock_t block; /* bitmap block number */
279+
xfs_fileoff_t block; /* bitmap block number */
280280
struct xfs_buf *bp; /* buf for the block */
281281
xfs_rtword_t *bufp; /* starting word in buffer */
282282
int error; /* error value */
@@ -446,15 +446,15 @@ xfs_rtmodify_summary_int(
446446
xfs_mount_t *mp, /* file system mount structure */
447447
xfs_trans_t *tp, /* transaction pointer */
448448
int log, /* log2 of extent size */
449-
xfs_rtblock_t bbno, /* bitmap block number */
449+
xfs_fileoff_t bbno, /* bitmap block number */
450450
int delta, /* change to make to summary info */
451451
struct xfs_buf **rbpp, /* in/out: summary block buffer */
452-
xfs_fsblock_t *rsb, /* in/out: summary block number */
452+
xfs_fileoff_t *rsb, /* in/out: summary block number */
453453
xfs_suminfo_t *sum) /* out: summary info for this block */
454454
{
455455
struct xfs_buf *bp; /* buffer for the summary block */
456456
int error; /* error value */
457-
xfs_fsblock_t sb; /* summary fsblock */
457+
xfs_fileoff_t sb; /* summary fsblock */
458458
int so; /* index into the summary file */
459459
xfs_suminfo_t *sp; /* pointer to returned data */
460460

@@ -516,10 +516,10 @@ xfs_rtmodify_summary(
516516
xfs_mount_t *mp, /* file system mount structure */
517517
xfs_trans_t *tp, /* transaction pointer */
518518
int log, /* log2 of extent size */
519-
xfs_rtblock_t bbno, /* bitmap block number */
519+
xfs_fileoff_t bbno, /* bitmap block number */
520520
int delta, /* change to make to summary info */
521521
struct xfs_buf **rbpp, /* in/out: summary block buffer */
522-
xfs_fsblock_t *rsb) /* in/out: summary block number */
522+
xfs_fileoff_t *rsb) /* in/out: summary block number */
523523
{
524524
return xfs_rtmodify_summary_int(mp, tp, log, bbno,
525525
delta, rbpp, rsb, NULL);
@@ -539,7 +539,7 @@ xfs_rtmodify_range(
539539
{
540540
xfs_rtword_t *b; /* current word in buffer */
541541
int bit; /* bit number in the word */
542-
xfs_rtblock_t block; /* bitmap block number */
542+
xfs_fileoff_t block; /* bitmap block number */
543543
struct xfs_buf *bp; /* buf for the block */
544544
xfs_rtword_t *bufp; /* starting word in buffer */
545545
int error; /* error value */
@@ -692,7 +692,7 @@ xfs_rtfree_range(
692692
xfs_rtblock_t start, /* starting block to free */
693693
xfs_rtxlen_t len, /* length to free */
694694
struct xfs_buf **rbpp, /* in/out: summary block buffer */
695-
xfs_fsblock_t *rsb) /* in/out: summary block number */
695+
xfs_fileoff_t *rsb) /* in/out: summary block number */
696696
{
697697
xfs_rtblock_t end; /* end of the freed extent */
698698
int error; /* error value */
@@ -773,7 +773,7 @@ xfs_rtcheck_range(
773773
{
774774
xfs_rtword_t *b; /* current word in buffer */
775775
int bit; /* bit number in the word */
776-
xfs_rtblock_t block; /* bitmap block number */
776+
xfs_fileoff_t block; /* bitmap block number */
777777
struct xfs_buf *bp; /* buf for the block */
778778
xfs_rtword_t *bufp; /* starting word in buffer */
779779
int error; /* error value */

fs/xfs/libxfs/xfs_rtbitmap.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ typedef int (*xfs_rtalloc_query_range_fn)(
2424

2525
#ifdef CONFIG_XFS_RT
2626
int xfs_rtbuf_get(struct xfs_mount *mp, struct xfs_trans *tp,
27-
xfs_rtblock_t block, int issum, struct xfs_buf **bpp);
27+
xfs_fileoff_t block, int issum, struct xfs_buf **bpp);
2828
int xfs_rtcheck_range(struct xfs_mount *mp, struct xfs_trans *tp,
2929
xfs_rtblock_t start, xfs_rtxlen_t len, int val,
3030
xfs_rtblock_t *new, int *stat);
@@ -37,15 +37,15 @@ int xfs_rtfind_forw(struct xfs_mount *mp, struct xfs_trans *tp,
3737
int xfs_rtmodify_range(struct xfs_mount *mp, struct xfs_trans *tp,
3838
xfs_rtblock_t start, xfs_rtxlen_t len, int val);
3939
int xfs_rtmodify_summary_int(struct xfs_mount *mp, struct xfs_trans *tp,
40-
int log, xfs_rtblock_t bbno, int delta,
41-
struct xfs_buf **rbpp, xfs_fsblock_t *rsb,
40+
int log, xfs_fileoff_t bbno, int delta,
41+
struct xfs_buf **rbpp, xfs_fileoff_t *rsb,
4242
xfs_suminfo_t *sum);
4343
int xfs_rtmodify_summary(struct xfs_mount *mp, struct xfs_trans *tp, int log,
44-
xfs_rtblock_t bbno, int delta, struct xfs_buf **rbpp,
45-
xfs_fsblock_t *rsb);
44+
xfs_fileoff_t bbno, int delta, struct xfs_buf **rbpp,
45+
xfs_fileoff_t *rsb);
4646
int xfs_rtfree_range(struct xfs_mount *mp, struct xfs_trans *tp,
4747
xfs_rtblock_t start, xfs_rtxlen_t len,
48-
struct xfs_buf **rbpp, xfs_fsblock_t *rsb);
48+
struct xfs_buf **rbpp, xfs_fileoff_t *rsb);
4949
int xfs_rtalloc_query_range(struct xfs_mount *mp, struct xfs_trans *tp,
5050
const struct xfs_rtalloc_rec *low_rec,
5151
const struct xfs_rtalloc_rec *high_rec,

fs/xfs/xfs_rtalloc.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ xfs_rtget_summary(
3232
xfs_mount_t *mp, /* file system mount structure */
3333
xfs_trans_t *tp, /* transaction pointer */
3434
int log, /* log2 of extent size */
35-
xfs_rtblock_t bbno, /* bitmap block number */
35+
xfs_fileoff_t bbno, /* bitmap block number */
3636
struct xfs_buf **rbpp, /* in/out: summary block buffer */
37-
xfs_fsblock_t *rsb, /* in/out: summary block number */
37+
xfs_fileoff_t *rsb, /* in/out: summary block number */
3838
xfs_suminfo_t *sum) /* out: summary info for this block */
3939
{
4040
return xfs_rtmodify_summary_int(mp, tp, log, bbno, 0, rbpp, rsb, sum);
@@ -50,9 +50,9 @@ xfs_rtany_summary(
5050
xfs_trans_t *tp, /* transaction pointer */
5151
int low, /* low log2 extent size */
5252
int high, /* high log2 extent size */
53-
xfs_rtblock_t bbno, /* bitmap block number */
53+
xfs_fileoff_t bbno, /* bitmap block number */
5454
struct xfs_buf **rbpp, /* in/out: summary block buffer */
55-
xfs_fsblock_t *rsb, /* in/out: summary block number */
55+
xfs_fileoff_t *rsb, /* in/out: summary block number */
5656
int *stat) /* out: any good extents here? */
5757
{
5858
int error; /* error value */
@@ -104,12 +104,12 @@ xfs_rtcopy_summary(
104104
xfs_mount_t *nmp, /* new file system mount point */
105105
xfs_trans_t *tp) /* transaction pointer */
106106
{
107-
xfs_rtblock_t bbno; /* bitmap block number */
107+
xfs_fileoff_t bbno; /* bitmap block number */
108108
struct xfs_buf *bp; /* summary buffer */
109109
int error; /* error return value */
110110
int log; /* summary level number (log length) */
111111
xfs_suminfo_t sum; /* summary data */
112-
xfs_fsblock_t sumbno; /* summary block number */
112+
xfs_fileoff_t sumbno; /* summary block number */
113113

114114
bp = NULL;
115115
for (log = omp->m_rsumlevels - 1; log >= 0; log--) {
@@ -146,7 +146,7 @@ xfs_rtallocate_range(
146146
xfs_rtblock_t start, /* start block to allocate */
147147
xfs_rtxlen_t len, /* length to allocate */
148148
struct xfs_buf **rbpp, /* in/out: summary block buffer */
149-
xfs_fsblock_t *rsb) /* in/out: summary block number */
149+
xfs_fileoff_t *rsb) /* in/out: summary block number */
150150
{
151151
xfs_rtblock_t end; /* end of the allocated extent */
152152
int error; /* error value */
@@ -239,13 +239,13 @@ STATIC int /* error */
239239
xfs_rtallocate_extent_block(
240240
xfs_mount_t *mp, /* file system mount point */
241241
xfs_trans_t *tp, /* transaction pointer */
242-
xfs_rtblock_t bbno, /* bitmap block number */
242+
xfs_fileoff_t bbno, /* bitmap block number */
243243
xfs_rtxlen_t minlen, /* minimum length to allocate */
244244
xfs_rtxlen_t maxlen, /* maximum length to allocate */
245245
xfs_rtxlen_t *len, /* out: actual length allocated */
246246
xfs_rtblock_t *nextp, /* out: next block to try */
247247
struct xfs_buf **rbpp, /* in/out: summary block buffer */
248-
xfs_fsblock_t *rsb, /* in/out: summary block number */
248+
xfs_fileoff_t *rsb, /* in/out: summary block number */
249249
xfs_rtxlen_t prod, /* extent product factor */
250250
xfs_rtblock_t *rtblock) /* out: start block allocated */
251251
{
@@ -364,7 +364,7 @@ xfs_rtallocate_extent_exact(
364364
xfs_rtxlen_t maxlen, /* maximum length to allocate */
365365
xfs_rtxlen_t *len, /* out: actual length allocated */
366366
struct xfs_buf **rbpp, /* in/out: summary block buffer */
367-
xfs_fsblock_t *rsb, /* in/out: summary block number */
367+
xfs_fileoff_t *rsb, /* in/out: summary block number */
368368
xfs_rtxlen_t prod, /* extent product factor */
369369
xfs_rtblock_t *rtblock) /* out: start block allocated */
370370
{
@@ -444,12 +444,12 @@ xfs_rtallocate_extent_near(
444444
xfs_rtxlen_t maxlen, /* maximum length to allocate */
445445
xfs_rtxlen_t *len, /* out: actual length allocated */
446446
struct xfs_buf **rbpp, /* in/out: summary block buffer */
447-
xfs_fsblock_t *rsb, /* in/out: summary block number */
447+
xfs_fileoff_t *rsb, /* in/out: summary block number */
448448
xfs_rtxlen_t prod, /* extent product factor */
449449
xfs_rtblock_t *rtblock) /* out: start block allocated */
450450
{
451451
int any; /* any useful extents from summary */
452-
xfs_rtblock_t bbno; /* bitmap block number */
452+
xfs_fileoff_t bbno; /* bitmap block number */
453453
int error; /* error value */
454454
int i; /* bitmap block offset (loop control) */
455455
int j; /* secondary loop control */
@@ -648,12 +648,12 @@ xfs_rtallocate_extent_size(
648648
xfs_rtxlen_t maxlen, /* maximum length to allocate */
649649
xfs_rtxlen_t *len, /* out: actual length allocated */
650650
struct xfs_buf **rbpp, /* in/out: summary block buffer */
651-
xfs_fsblock_t *rsb, /* in/out: summary block number */
651+
xfs_fileoff_t *rsb, /* in/out: summary block number */
652652
xfs_rtxlen_t prod, /* extent product factor */
653653
xfs_rtblock_t *rtblock) /* out: start block allocated */
654654
{
655655
int error; /* error value */
656-
int i; /* bitmap block number */
656+
xfs_fileoff_t i; /* bitmap block number */
657657
int l; /* level number (loop control) */
658658
xfs_rtblock_t n; /* next block to be tried */
659659
xfs_rtblock_t r; /* result block number */
@@ -929,7 +929,7 @@ xfs_growfs_rt(
929929
xfs_mount_t *mp, /* mount point for filesystem */
930930
xfs_growfs_rt_t *in) /* growfs rt input struct */
931931
{
932-
xfs_rtblock_t bmbno; /* bitmap block number */
932+
xfs_fileoff_t bmbno; /* bitmap block number */
933933
struct xfs_buf *bp; /* temporary buffer */
934934
int error; /* error return value */
935935
xfs_mount_t *nmp; /* new (fake) mount structure */
@@ -944,7 +944,7 @@ xfs_growfs_rt(
944944
xfs_extlen_t rbmblocks; /* current number of rt bitmap blocks */
945945
xfs_extlen_t rsumblocks; /* current number of rt summary blks */
946946
xfs_sb_t *sbp; /* old superblock */
947-
xfs_fsblock_t sumbno; /* summary block number */
947+
xfs_fileoff_t sumbno; /* summary block number */
948948
uint8_t *rsum_cache; /* old summary cache */
949949

950950
sbp = &mp->m_sb;
@@ -1207,7 +1207,7 @@ xfs_rtallocate_extent(
12071207
xfs_mount_t *mp = tp->t_mountp;
12081208
int error; /* error value */
12091209
xfs_rtblock_t r; /* result allocated block */
1210-
xfs_fsblock_t sb; /* summary file block number */
1210+
xfs_fileoff_t sb; /* summary file block number */
12111211
struct xfs_buf *sumbp; /* summary file block buffer */
12121212

12131213
ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));

0 commit comments

Comments
 (0)