1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
7 typedef struct fs_geometry
{
9 * these types should match the superblock types
11 uint32_t sb_blocksize
; /* blocksize (bytes) */
12 xfs_rfsblock_t sb_dblocks
; /* # data blocks */
13 xfs_rfsblock_t sb_rblocks
; /* # realtime blocks */
14 xfs_rtblock_t sb_rextents
; /* # realtime extents */
15 xfs_fsblock_t sb_logstart
; /* starting log block # */
16 xfs_agblock_t sb_rextsize
; /* realtime extent size (blocks )*/
17 xfs_agblock_t sb_agblocks
; /* # of blocks per ag */
18 xfs_agnumber_t sb_agcount
; /* # of ags */
19 xfs_extlen_t sb_rbmblocks
; /* # of rt bitmap blocks */
20 xfs_extlen_t sb_logblocks
; /* # of log blocks */
21 uint16_t sb_sectsize
; /* volume sector size (bytes) */
22 uint16_t sb_inodesize
; /* inode size (bytes) */
23 uint8_t sb_imax_pct
; /* max % of fs for inode space */
26 * these don't have to match the superblock types but are placed
27 * before sb_shared_vn because these values don't have to be
28 * checked manually. These variables will be set only on
29 * filesystems with dependably good (fully initialized)
30 * secondary superblock sectors, will be stamped in all
31 * superblocks at mkfs time, and are features that cannot
32 * be downgraded unless all superblocks in the filesystem
35 int sb_extflgbit
; /* extent flag feature bit set */
38 * fields after this point have to be checked manually in compare_sb()
40 uint8_t sb_shared_vn
; /* shared version number */
41 xfs_extlen_t sb_inoalignmt
; /* inode chunk alignment, fsblocks */
42 uint32_t sb_unit
; /* stripe or raid unit */
43 uint32_t sb_width
; /* stripe or width unit */
46 * these don't have to match, they track superblock properties
47 * that could have been upgraded and/or downgraded during
48 * run-time so that the primary superblock has them but the
50 * Plus, they have associated data fields whose data fields may
51 * be corrupt in cases where the filesystem was made on a
52 * pre-6.5 campus alpha mkfs and the feature was enabled on
53 * the filesystem later.
55 int sb_ialignbit
; /* sb has inode alignment bit set */
56 int sb_salignbit
; /* sb has stripe alignment bit set */
57 int sb_sharedbit
; /* sb has inode alignment bit set */
59 int sb_fully_zeroed
; /* has zeroed secondary sb sectors */
62 typedef struct fs_geo_list
{
63 struct fs_geo_list
*next
;
70 * fields for sb_last_nonzero
73 #define XR_SB_COUNTERS 0x0001
74 #define XR_SB_INOALIGN 0x0002
75 #define XR_SB_SALIGN 0x0004
78 * what got modified by verify_set_* routines
84 #define XR_AG_SB_SEC 0x8