blob: 13564d69800af4973ea79ef10dfd141b88034815 [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Nathan Scott7b718762005-11-02 14:58:39 +11003 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 */
6#ifndef __XFS_SB_H__
7#define __XFS_SB_H__
8
Dave Chinnerb16817b2018-05-13 23:10:08 -07009struct xfs_mount;
10struct xfs_sb;
11struct xfs_dsb;
12struct xfs_trans;
13struct xfs_fsop_geom;
14struct xfs_perag;
15
Linus Torvalds1da177e2005-04-16 15:20:36 -070016/*
Dave Chinnerff550682013-08-12 20:49:41 +100017 * perag get/put wrappers for ref counting
18 */
19extern struct xfs_perag *xfs_perag_get(struct xfs_mount *, xfs_agnumber_t);
20extern struct xfs_perag *xfs_perag_get_tag(struct xfs_mount *, xfs_agnumber_t,
21 int tag);
22extern void xfs_perag_put(struct xfs_perag *pag);
23extern int xfs_initialize_perag_data(struct xfs_mount *, xfs_agnumber_t);
24
Dave Chinner61e63ec2015-01-22 09:10:31 +110025extern void xfs_log_sb(struct xfs_trans *tp);
26extern int xfs_sync_sb(struct xfs_mount *mp, bool wait);
Eric Sandeenf7664b32018-05-15 13:21:48 -070027extern int xfs_sync_sb_buf(struct xfs_mount *mp);
Dave Chinner4d11a402015-01-22 09:10:26 +110028extern void xfs_sb_mount_common(struct xfs_mount *mp, struct xfs_sb *sbp);
29extern void xfs_sb_from_disk(struct xfs_sb *to, struct xfs_dsb *from);
30extern void xfs_sb_to_disk(struct xfs_dsb *to, struct xfs_sb *from);
Dave Chinnerff550682013-08-12 20:49:41 +100031extern void xfs_sb_quota_from_disk(struct xfs_sb *sbp);
32
Dave Chinnerb16817b2018-05-13 23:10:08 -070033extern int xfs_update_secondary_sbs(struct xfs_mount *mp);
34
Darrick J. Wongac503a42018-01-08 10:51:27 -080035#define XFS_FS_GEOM_MAX_STRUCT_VER (4)
36extern int xfs_fs_geometry(struct xfs_sb *sbp, struct xfs_fsop_geom *geo,
37 int struct_version);
Darrick J. Wong689e11c2018-05-14 06:34:31 -070038extern 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. Wongd25522f2018-05-29 22:18:12 -070041extern 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. Wongc368ebc2018-01-08 10:51:27 -080044
Linus Torvalds1da177e2005-04-16 15:20:36 -070045#endif /* __XFS_SB_H__ */