2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
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.
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.
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
19 typedef struct fs_geometry
{
21 * these types should match the superblock types
23 __uint32_t sb_blocksize
; /* blocksize (bytes) */
24 xfs_drfsbno_t sb_dblocks
; /* # data blocks */
25 xfs_drfsbno_t sb_rblocks
; /* # realtime blocks */
26 xfs_drtbno_t sb_rextents
; /* # realtime extents */
27 uuid_t sb_uuid
; /* fs uuid */
28 xfs_dfsbno_t sb_logstart
; /* starting log block # */
29 xfs_agblock_t sb_rextsize
; /* realtime extent size (blocks )*/
30 xfs_agblock_t sb_agblocks
; /* # of blocks per ag */
31 xfs_agnumber_t sb_agcount
; /* # of ags */
32 xfs_extlen_t sb_rbmblocks
; /* # of rt bitmap blocks */
33 xfs_extlen_t sb_logblocks
; /* # of log blocks */
34 __uint16_t sb_sectsize
; /* volume sector size (bytes) */
35 __uint16_t sb_inodesize
; /* inode size (bytes) */
36 __uint8_t sb_imax_pct
; /* max % of fs for inode space */
39 * these don't have to match the superblock types but are placed
40 * before sb_shared_vn because these values don't have to be
41 * checked manually. These variables will be set only on
42 * filesystems with dependably good (fully initialized)
43 * secondary superblock sectors, will be stamped in all
44 * superblocks at mkfs time, and are features that cannot
45 * be downgraded unless all superblocks in the filesystem
48 int sb_extflgbit
; /* extent flag feature bit set */
51 * fields after this point have to be checked manually in compare_sb()
53 __uint8_t sb_shared_vn
; /* shared version number */
54 xfs_extlen_t sb_inoalignmt
; /* inode chunk alignment, fsblocks */
55 __uint32_t sb_unit
; /* stripe or raid unit */
56 __uint32_t sb_width
; /* stripe or width unit */
59 * these don't have to match, they track superblock properties
60 * that could have been upgraded and/or downgraded during
61 * run-time so that the primary superblock has them but the
63 * Plus, they have associated data fields whose data fields may
64 * be corrupt in cases where the filesystem was made on a
65 * pre-6.5 campus alpha mkfs and the feature was enabled on
66 * the filesystem later.
68 int sb_ialignbit
; /* sb has inode alignment bit set */
69 int sb_salignbit
; /* sb has stripe alignment bit set */
70 int sb_sharedbit
; /* sb has inode alignment bit set */
72 int sb_fully_zeroed
; /* has zeroed secondary sb sectors */
75 typedef struct fs_geo_list
{
76 struct fs_geo_list
*next
;
83 * fields for sb_last_nonzero
86 #define XR_SB_COUNTERS 0x0001
87 #define XR_SB_INOALIGN 0x0002
88 #define XR_SB_SALIGN 0x0004
91 * what got modified by verify_set_* routines
97 #define XR_AG_SB_SEC 0x8