]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - repair/agheader.h
xfsprogs: remove double-underscore integer types
[thirdparty/xfsprogs-dev.git] / repair / agheader.h
1 /*
2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 typedef struct fs_geometry {
20 /*
21 * these types should match the superblock types
22 */
23 uint32_t sb_blocksize; /* blocksize (bytes) */
24 xfs_rfsblock_t sb_dblocks; /* # data blocks */
25 xfs_rfsblock_t sb_rblocks; /* # realtime blocks */
26 xfs_rtblock_t sb_rextents; /* # realtime extents */
27 xfs_fsblock_t sb_logstart; /* starting log block # */
28 xfs_agblock_t sb_rextsize; /* realtime extent size (blocks )*/
29 xfs_agblock_t sb_agblocks; /* # of blocks per ag */
30 xfs_agnumber_t sb_agcount; /* # of ags */
31 xfs_extlen_t sb_rbmblocks; /* # of rt bitmap blocks */
32 xfs_extlen_t sb_logblocks; /* # of log blocks */
33 uint16_t sb_sectsize; /* volume sector size (bytes) */
34 uint16_t sb_inodesize; /* inode size (bytes) */
35 uint8_t sb_imax_pct; /* max % of fs for inode space */
36
37 /*
38 * these don't have to match the superblock types but are placed
39 * before sb_shared_vn because these values don't have to be
40 * checked manually. These variables will be set only on
41 * filesystems with dependably good (fully initialized)
42 * secondary superblock sectors, will be stamped in all
43 * superblocks at mkfs time, and are features that cannot
44 * be downgraded unless all superblocks in the filesystem
45 * are rewritten.
46 */
47 int sb_extflgbit; /* extent flag feature bit set */
48
49 /*
50 * fields after this point have to be checked manually in compare_sb()
51 */
52 uint8_t sb_shared_vn; /* shared version number */
53 xfs_extlen_t sb_inoalignmt; /* inode chunk alignment, fsblocks */
54 uint32_t sb_unit; /* stripe or raid unit */
55 uint32_t sb_width; /* stripe or width unit */
56
57 /*
58 * these don't have to match, they track superblock properties
59 * that could have been upgraded and/or downgraded during
60 * run-time so that the primary superblock has them but the
61 * secondaries do not.
62 * Plus, they have associated data fields whose data fields may
63 * be corrupt in cases where the filesystem was made on a
64 * pre-6.5 campus alpha mkfs and the feature was enabled on
65 * the filesystem later.
66 */
67 int sb_ialignbit; /* sb has inode alignment bit set */
68 int sb_salignbit; /* sb has stripe alignment bit set */
69 int sb_sharedbit; /* sb has inode alignment bit set */
70
71 int sb_fully_zeroed; /* has zeroed secondary sb sectors */
72 } fs_geometry_t;
73
74 typedef struct fs_geo_list {
75 struct fs_geo_list *next;
76 int refs;
77 int index;
78 fs_geometry_t geo;
79 } fs_geo_list_t;
80
81 /*
82 * fields for sb_last_nonzero
83 */
84
85 #define XR_SB_COUNTERS 0x0001
86 #define XR_SB_INOALIGN 0x0002
87 #define XR_SB_SALIGN 0x0004
88
89 /*
90 * what got modified by verify_set_* routines
91 */
92
93 #define XR_AG_SB 0x1
94 #define XR_AG_AGF 0x2
95 #define XR_AG_AGI 0x4
96 #define XR_AG_SB_SEC 0x8