#define __XFS_RTBITMAP_H__
/*
- * XXX: Most of the realtime allocation functions deal in units of realtime
- * extents, not realtime blocks. This looks funny when paired with the type
- * name and screams for a larger cleanup.
+ * Functions for walking free space rtextents in the realtime bitmap.
*/
struct xfs_rtalloc_rec {
- xfs_rtblock_t ar_startext;
+ xfs_rtxnum_t ar_startext;
xfs_rtbxlen_t ar_extcount;
};
int xfs_rtbuf_get(struct xfs_mount *mp, struct xfs_trans *tp,
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);
+ xfs_rtxnum_t start, xfs_rtxlen_t len, int val,
+ xfs_rtxnum_t *new, int *stat);
int xfs_rtfind_back(struct xfs_mount *mp, struct xfs_trans *tp,
- xfs_rtblock_t start, xfs_rtblock_t limit,
- xfs_rtblock_t *rtblock);
+ xfs_rtxnum_t start, xfs_rtxnum_t limit,
+ xfs_rtxnum_t *rtblock);
int xfs_rtfind_forw(struct xfs_mount *mp, struct xfs_trans *tp,
- xfs_rtblock_t start, xfs_rtblock_t limit,
- xfs_rtblock_t *rtblock);
+ xfs_rtxnum_t start, xfs_rtxnum_t limit,
+ xfs_rtxnum_t *rtblock);
int xfs_rtmodify_range(struct xfs_mount *mp, struct xfs_trans *tp,
- xfs_rtblock_t start, xfs_rtxlen_t len, int val);
+ xfs_rtxnum_t start, xfs_rtxlen_t len, int val);
int xfs_rtmodify_summary_int(struct xfs_mount *mp, struct xfs_trans *tp,
int log, xfs_fileoff_t bbno, int delta,
struct xfs_buf **rbpp, xfs_fileoff_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,
+ xfs_rtxnum_t start, xfs_rtxlen_t len,
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,
xfs_rtalloc_query_range_fn fn,
void *priv);
int xfs_rtalloc_extent_is_free(struct xfs_mount *mp, struct xfs_trans *tp,
- xfs_rtblock_t start, xfs_rtxlen_t len,
+ xfs_rtxnum_t start, xfs_rtxlen_t len,
bool *is_free);
/*
* Free an extent in the realtime subvolume. Length is expressed in
int /* error */
xfs_rtfree_extent(
struct xfs_trans *tp, /* transaction pointer */
- xfs_rtblock_t bno, /* starting block number to free */
+ xfs_rtxnum_t start, /* starting rtext number to free */
xfs_rtxlen_t len); /* length of extent freed */
/* Same as above, but in units of rt blocks. */