#ifndef __LIBXFS_AG_H
#define __LIBXFS_AG_H …
struct xfs_mount;
struct xfs_trans;
struct xfs_perag;
struct xfs_ag_resv { … };
struct xfs_perag { … };
#define XFS_AGSTATE_AGF_INIT …
#define XFS_AGSTATE_AGI_INIT …
#define XFS_AGSTATE_PREFERS_METADATA …
#define XFS_AGSTATE_ALLOWS_INODES …
#define XFS_AGSTATE_AGFL_NEEDS_RESET …
#define __XFS_AG_OPSTATE(name, NAME) …
__XFS_AG_OPSTATE(…)
__XFS_AG_OPSTATE(…)
__XFS_AG_OPSTATE(…)
__XFS_AG_OPSTATE(…)
__XFS_AG_OPSTATE(…)
void xfs_free_unused_perag_range(struct xfs_mount *mp, xfs_agnumber_t agstart,
xfs_agnumber_t agend);
int xfs_initialize_perag(struct xfs_mount *mp, xfs_agnumber_t agcount,
xfs_rfsblock_t dcount, xfs_agnumber_t *maxagi);
int xfs_initialize_perag_data(struct xfs_mount *mp, xfs_agnumber_t agno);
void xfs_free_perag(struct xfs_mount *mp);
struct xfs_perag *xfs_perag_get(struct xfs_mount *mp, xfs_agnumber_t agno);
struct xfs_perag *xfs_perag_get_tag(struct xfs_mount *mp, xfs_agnumber_t agno,
unsigned int tag);
struct xfs_perag *xfs_perag_hold(struct xfs_perag *pag);
void xfs_perag_put(struct xfs_perag *pag);
struct xfs_perag *xfs_perag_grab(struct xfs_mount *, xfs_agnumber_t);
struct xfs_perag *xfs_perag_grab_tag(struct xfs_mount *, xfs_agnumber_t,
int tag);
void xfs_perag_rele(struct xfs_perag *pag);
xfs_agblock_t xfs_ag_block_count(struct xfs_mount *mp, xfs_agnumber_t agno);
void xfs_agino_range(struct xfs_mount *mp, xfs_agnumber_t agno,
xfs_agino_t *first, xfs_agino_t *last);
static inline bool
xfs_verify_agbno(struct xfs_perag *pag, xfs_agblock_t agbno)
{ … }
static inline bool
xfs_verify_agbext(
struct xfs_perag *pag,
xfs_agblock_t agbno,
xfs_agblock_t len)
{ … }
static inline bool
xfs_verify_agino(struct xfs_perag *pag, xfs_agino_t agino)
{ … }
static inline bool
xfs_verify_agino_or_null(struct xfs_perag *pag, xfs_agino_t agino)
{ … }
static inline bool
xfs_ag_contains_log(struct xfs_mount *mp, xfs_agnumber_t agno)
{ … }
static inline struct xfs_perag *
xfs_perag_next(
struct xfs_perag *pag,
xfs_agnumber_t *agno,
xfs_agnumber_t end_agno)
{ … }
#define for_each_perag_range(mp, agno, end_agno, pag) …
#define for_each_perag_from(mp, agno, pag) …
#define for_each_perag(mp, agno, pag) …
#define for_each_perag_tag(mp, agno, pag, tag) …
static inline struct xfs_perag *
xfs_perag_next_wrap(
struct xfs_perag *pag,
xfs_agnumber_t *agno,
xfs_agnumber_t stop_agno,
xfs_agnumber_t restart_agno,
xfs_agnumber_t wrap_agno)
{ … }
#define for_each_perag_wrap_range(mp, start_agno, restart_agno, wrap_agno, agno, pag) …
#define for_each_perag_wrap_at(mp, start_agno, wrap_agno, agno, pag) …
#define for_each_perag_wrap(mp, start_agno, agno, pag) …
struct aghdr_init_data { … };
int xfs_ag_init_headers(struct xfs_mount *mp, struct aghdr_init_data *id);
int xfs_ag_shrink_space(struct xfs_perag *pag, struct xfs_trans **tpp,
xfs_extlen_t delta);
int xfs_ag_extend_space(struct xfs_perag *pag, struct xfs_trans *tp,
xfs_extlen_t len);
int xfs_ag_get_geometry(struct xfs_perag *pag, struct xfs_ag_geometry *ageo);
#endif