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>
diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c
index 1827f91..f27274a 100644
--- a/libxfs/xfs_rtbitmap.c
+++ b/libxfs/xfs_rtbitmap.c
@@ -54,7 +54,7 @@
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 */
{
@@ -106,7 +106,7 @@
{
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 */
@@ -281,7 +281,7 @@
{
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 */
@@ -451,15 +451,15 @@
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 */
@@ -521,10 +521,10 @@
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);
@@ -544,7 +544,7 @@
{
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 */
@@ -697,7 +697,7 @@
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 */
@@ -778,7 +778,7 @@
{
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 */
diff --git a/libxfs/xfs_rtbitmap.h b/libxfs/xfs_rtbitmap.h
index d444961..e2ea6d3 100644
--- a/libxfs/xfs_rtbitmap.h
+++ b/libxfs/xfs_rtbitmap.h
@@ -24,7 +24,7 @@
#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_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,