xfs_ag.h 818 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2018 Red Hat, Inc.
  4. * All rights reserved.
  5. */
  6. #ifndef __LIBXFS_AG_H
  7. #define __LIBXFS_AG_H 1
  8. struct xfs_mount;
  9. struct xfs_trans;
  10. struct aghdr_init_data {
  11. /* per ag data */
  12. xfs_agblock_t agno; /* ag to init */
  13. xfs_extlen_t agsize; /* new AG size */
  14. struct list_head buffer_list; /* buffer writeback list */
  15. xfs_rfsblock_t nfree; /* cumulative new free space */
  16. /* per header data */
  17. xfs_daddr_t daddr; /* header location */
  18. size_t numblks; /* size of header */
  19. xfs_btnum_t type; /* type of btree root block */
  20. };
  21. int xfs_ag_init_headers(struct xfs_mount *mp, struct aghdr_init_data *id);
  22. int xfs_ag_extend_space(struct xfs_mount *mp, struct xfs_trans *tp,
  23. struct aghdr_init_data *id, xfs_extlen_t len);
  24. #endif /* __LIBXFS_AG_H */