xfs: const-ify xfs_owner_info arguments
Only certain functions actually change the contents of an xfs_owner_info; the rest can accept a const struct pointer. This will enable us to save stack space by hoisting static owner info types to be const global variables. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
@@ -21,8 +21,9 @@ int xrep_roll_ag_trans(struct xfs_scrub *sc);
|
||||
bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks,
|
||||
enum xfs_ag_resv_type type);
|
||||
xfs_extlen_t xrep_calc_ag_resblks(struct xfs_scrub *sc);
|
||||
int xrep_alloc_ag_block(struct xfs_scrub *sc, struct xfs_owner_info *oinfo,
|
||||
xfs_fsblock_t *fsbno, enum xfs_ag_resv_type resv);
|
||||
int xrep_alloc_ag_block(struct xfs_scrub *sc,
|
||||
const struct xfs_owner_info *oinfo, xfs_fsblock_t *fsbno,
|
||||
enum xfs_ag_resv_type resv);
|
||||
int xrep_init_btblock(struct xfs_scrub *sc, xfs_fsblock_t fsb,
|
||||
struct xfs_buf **bpp, xfs_btnum_t btnum,
|
||||
const struct xfs_buf_ops *ops);
|
||||
@@ -32,7 +33,7 @@ struct xfs_bitmap;
|
||||
int xrep_fix_freelist(struct xfs_scrub *sc, bool can_shrink);
|
||||
int xrep_invalidate_blocks(struct xfs_scrub *sc, struct xfs_bitmap *btlist);
|
||||
int xrep_reap_extents(struct xfs_scrub *sc, struct xfs_bitmap *exlist,
|
||||
struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type);
|
||||
const struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type);
|
||||
|
||||
struct xrep_find_ag_btree {
|
||||
/* in: rmap owner of the btree we're looking for */
|
||||
|
Reference in New Issue
Block a user