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