^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) 2000-2005 Silicon Graphics, 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) #ifndef __XFS_SB_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define __XFS_SB_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) struct xfs_mount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) struct xfs_sb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct xfs_dsb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) struct xfs_trans;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct xfs_fsop_geom;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct xfs_perag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * perag get/put wrappers for ref counting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) extern struct xfs_perag *xfs_perag_get(struct xfs_mount *, xfs_agnumber_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) extern struct xfs_perag *xfs_perag_get_tag(struct xfs_mount *, xfs_agnumber_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) int tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern void xfs_perag_put(struct xfs_perag *pag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) extern int xfs_initialize_perag_data(struct xfs_mount *, xfs_agnumber_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) extern void xfs_log_sb(struct xfs_trans *tp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) extern int xfs_sync_sb(struct xfs_mount *mp, bool wait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) extern int xfs_sync_sb_buf(struct xfs_mount *mp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) extern void xfs_sb_mount_common(struct xfs_mount *mp, struct xfs_sb *sbp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) extern void xfs_sb_from_disk(struct xfs_sb *to, struct xfs_dsb *from);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) extern void xfs_sb_to_disk(struct xfs_dsb *to, struct xfs_sb *from);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) extern void xfs_sb_quota_from_disk(struct xfs_sb *sbp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) extern int xfs_update_secondary_sbs(struct xfs_mount *mp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #define XFS_FS_GEOM_MAX_STRUCT_VER (4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) extern void xfs_fs_geometry(struct xfs_sb *sbp, struct xfs_fsop_geom *geo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) int struct_version);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) extern int xfs_sb_read_secondary(struct xfs_mount *mp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) struct xfs_trans *tp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) struct xfs_buf **bpp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) extern int xfs_sb_get_secondary(struct xfs_mount *mp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) struct xfs_trans *tp, xfs_agnumber_t agno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) struct xfs_buf **bpp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #endif /* __XFS_SB_H__ */