]>
Commit | Line | Data |
---|---|---|
959ef981 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2bd0ea18 | 2 | /* |
da23017d NS |
3 | * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. |
4 | * All Rights Reserved. | |
2bd0ea18 NS |
5 | */ |
6 | ||
7 | typedef struct fs_geometry { | |
8 | /* | |
9 | * these types should match the superblock types | |
10 | */ | |
14f8b681 | 11 | uint32_t sb_blocksize; /* blocksize (bytes) */ |
5a35bf2c DC |
12 | xfs_rfsblock_t sb_dblocks; /* # data blocks */ |
13 | xfs_rfsblock_t sb_rblocks; /* # realtime blocks */ | |
14 | xfs_rtblock_t sb_rextents; /* # realtime extents */ | |
5a35bf2c | 15 | xfs_fsblock_t sb_logstart; /* starting log block # */ |
2bd0ea18 NS |
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 */ | |
14f8b681 DW |
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 */ | |
2bd0ea18 NS |
24 | |
25 | /* | |
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 | |
33 | * are rewritten. | |
34 | */ | |
35 | int sb_extflgbit; /* extent flag feature bit set */ | |
36 | ||
37 | /* | |
38 | * fields after this point have to be checked manually in compare_sb() | |
39 | */ | |
14f8b681 | 40 | uint8_t sb_shared_vn; /* shared version number */ |
2bd0ea18 | 41 | xfs_extlen_t sb_inoalignmt; /* inode chunk alignment, fsblocks */ |
14f8b681 DW |
42 | uint32_t sb_unit; /* stripe or raid unit */ |
43 | uint32_t sb_width; /* stripe or width unit */ | |
2bd0ea18 NS |
44 | |
45 | /* | |
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 | |
49 | * secondaries do not. | |
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. | |
54 | */ | |
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 */ | |
58 | ||
59 | int sb_fully_zeroed; /* has zeroed secondary sb sectors */ | |
60 | } fs_geometry_t; | |
61 | ||
62 | typedef struct fs_geo_list { | |
63 | struct fs_geo_list *next; | |
64 | int refs; | |
65 | int index; | |
66 | fs_geometry_t geo; | |
67 | } fs_geo_list_t; | |
68 | ||
69 | /* | |
70 | * fields for sb_last_nonzero | |
71 | */ | |
72 | ||
73 | #define XR_SB_COUNTERS 0x0001 | |
74 | #define XR_SB_INOALIGN 0x0002 | |
75 | #define XR_SB_SALIGN 0x0004 | |
76 | ||
77 | /* | |
78 | * what got modified by verify_set_* routines | |
79 | */ | |
80 | ||
81 | #define XR_AG_SB 0x1 | |
82 | #define XR_AG_AGF 0x2 | |
83 | #define XR_AG_AGI 0x4 | |
84 | #define XR_AG_SB_SEC 0x8 |