Dave Chinner | 0b61f8a | 2018-06-05 19:42:14 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 3 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 4 | * All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | */ |
| 6 | #ifndef __XFS_SB_H__ |
| 7 | #define __XFS_SB_H__ |
| 8 | |
Dave Chinner | b16817b | 2018-05-13 23:10:08 -0700 | [diff] [blame] | 9 | struct xfs_mount; |
| 10 | struct xfs_sb; |
| 11 | struct xfs_dsb; |
| 12 | struct xfs_trans; |
| 13 | struct xfs_fsop_geom; |
| 14 | struct xfs_perag; |
| 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | /* |
Dave Chinner | ff55068 | 2013-08-12 20:49:41 +1000 | [diff] [blame] | 17 | * perag get/put wrappers for ref counting |
| 18 | */ |
| 19 | extern struct xfs_perag *xfs_perag_get(struct xfs_mount *, xfs_agnumber_t); |
| 20 | extern struct xfs_perag *xfs_perag_get_tag(struct xfs_mount *, xfs_agnumber_t, |
| 21 | int tag); |
| 22 | extern void xfs_perag_put(struct xfs_perag *pag); |
| 23 | extern int xfs_initialize_perag_data(struct xfs_mount *, xfs_agnumber_t); |
| 24 | |
Dave Chinner | 61e63ec | 2015-01-22 09:10:31 +1100 | [diff] [blame] | 25 | extern void xfs_log_sb(struct xfs_trans *tp); |
| 26 | extern int xfs_sync_sb(struct xfs_mount *mp, bool wait); |
Eric Sandeen | f7664b3 | 2018-05-15 13:21:48 -0700 | [diff] [blame] | 27 | extern int xfs_sync_sb_buf(struct xfs_mount *mp); |
Dave Chinner | 4d11a40 | 2015-01-22 09:10:26 +1100 | [diff] [blame] | 28 | extern void xfs_sb_mount_common(struct xfs_mount *mp, struct xfs_sb *sbp); |
| 29 | extern void xfs_sb_from_disk(struct xfs_sb *to, struct xfs_dsb *from); |
| 30 | extern void xfs_sb_to_disk(struct xfs_dsb *to, struct xfs_sb *from); |
Dave Chinner | ff55068 | 2013-08-12 20:49:41 +1000 | [diff] [blame] | 31 | extern void xfs_sb_quota_from_disk(struct xfs_sb *sbp); |
| 32 | |
Dave Chinner | b16817b | 2018-05-13 23:10:08 -0700 | [diff] [blame] | 33 | extern int xfs_update_secondary_sbs(struct xfs_mount *mp); |
| 34 | |
Darrick J. Wong | ac503a4 | 2018-01-08 10:51:27 -0800 | [diff] [blame] | 35 | #define XFS_FS_GEOM_MAX_STRUCT_VER (4) |
| 36 | extern int xfs_fs_geometry(struct xfs_sb *sbp, struct xfs_fsop_geom *geo, |
| 37 | int struct_version); |
Darrick J. Wong | 689e11c | 2018-05-14 06:34:31 -0700 | [diff] [blame] | 38 | extern int xfs_sb_read_secondary(struct xfs_mount *mp, |
| 39 | struct xfs_trans *tp, xfs_agnumber_t agno, |
| 40 | struct xfs_buf **bpp); |
Darrick J. Wong | d25522f | 2018-05-29 22:18:12 -0700 | [diff] [blame] | 41 | extern int xfs_sb_get_secondary(struct xfs_mount *mp, |
| 42 | struct xfs_trans *tp, xfs_agnumber_t agno, |
| 43 | struct xfs_buf **bpp); |
Darrick J. Wong | c368ebc | 2018-01-08 10:51:27 -0800 | [diff] [blame] | 44 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | #endif /* __XFS_SB_H__ */ |