~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to repair/agheader.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2002-04-13 09:45:06 UTC
  • Revision ID: james.westby@ubuntu.com-20020413094506-t8dhemv41gkeg4kx
Tags: 2.0.3-1
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
 
3
 * 
 
4
 * This program is free software; you can redistribute it and/or modify it
 
5
 * under the terms of version 2 of the GNU General Public License as
 
6
 * published by the Free Software Foundation.
 
7
 * 
 
8
 * This program is distributed in the hope that it would be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
11
 * 
 
12
 * Further, this software is distributed without any warranty that it is
 
13
 * free of the rightful claim of any third person regarding infringement
 
14
 * or the like.  Any license provided herein, whether implied or
 
15
 * otherwise, applies only to this software file.  Patent licenses, if
 
16
 * any, provided herein do not apply to combinations of this program with
 
17
 * other software, or any other product whatsoever.
 
18
 * 
 
19
 * You should have received a copy of the GNU General Public License along
 
20
 * with this program; if not, write the Free Software Foundation, Inc., 59
 
21
 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
 
22
 * 
 
23
 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
 
24
 * Mountain View, CA  94043, or:
 
25
 * 
 
26
 * http://www.sgi.com 
 
27
 * 
 
28
 * For further information regarding this notice, see: 
 
29
 * 
 
30
 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 
31
 */
 
32
 
 
33
typedef struct fs_geometry  {
 
34
        /*
 
35
         * these types should match the superblock types
 
36
         */
 
37
        __uint32_t      sb_blocksize;   /* blocksize (bytes) */
 
38
        xfs_drfsbno_t   sb_dblocks;     /* # data blocks */
 
39
        xfs_drfsbno_t   sb_rblocks;     /* # realtime blocks */
 
40
        xfs_drtbno_t    sb_rextents;    /* # realtime extents */
 
41
        uuid_t          sb_uuid;        /* fs uuid */
 
42
        xfs_dfsbno_t    sb_logstart;    /* starting log block # */
 
43
        xfs_agblock_t   sb_rextsize;    /* realtime extent size (blocks )*/
 
44
        xfs_agblock_t   sb_agblocks;    /* # of blocks per ag */
 
45
        xfs_agnumber_t  sb_agcount;     /* # of ags */
 
46
        xfs_extlen_t    sb_rbmblocks;   /* # of rt bitmap blocks */
 
47
        xfs_extlen_t    sb_logblocks;   /* # of log blocks */
 
48
        __uint16_t      sb_sectsize;    /* volume sector size (bytes) */
 
49
        __uint16_t      sb_inodesize;   /* inode size (bytes) */
 
50
        __uint8_t       sb_imax_pct;    /* max % of fs for inode space */
 
51
 
 
52
        /*
 
53
         * these don't have to match the superblock types but are placed
 
54
         * before sb_shared_vn because these values don't have to be
 
55
         * checked manually.  These variables will be set only on
 
56
         * filesystems with dependably good (fully initialized)
 
57
         * secondary superblock sectors, will be stamped in all
 
58
         * superblocks at mkfs time, and are features that cannot
 
59
         * be downgraded unless all superblocks in the filesystem
 
60
         * are rewritten.
 
61
         */
 
62
        int             sb_extflgbit;   /* extent flag feature bit set */
 
63
 
 
64
        /*
 
65
         * fields after this point have to be checked manually in compare_sb()
 
66
         */
 
67
        __uint8_t       sb_shared_vn;   /* shared version number */
 
68
        xfs_extlen_t    sb_inoalignmt;  /* inode chunk alignment, fsblocks */
 
69
        __uint32_t      sb_unit;        /* stripe or raid unit */
 
70
        __uint32_t      sb_width;       /* stripe or width unit */
 
71
 
 
72
        /*
 
73
         * these don't have to match, they track superblock properties
 
74
         * that could have been upgraded and/or downgraded during
 
75
         * run-time so that the primary superblock has them but the
 
76
         * secondaries do not.
 
77
         * Plus, they have associated data fields whose data fields may
 
78
         * be corrupt in cases where the filesystem was made on a
 
79
         * pre-6.5 campus alpha mkfs and the feature was enabled on
 
80
         * the filesystem later.
 
81
         */
 
82
        int             sb_ialignbit;   /* sb has inode alignment bit set */
 
83
        int             sb_salignbit;   /* sb has stripe alignment bit set */
 
84
        int             sb_sharedbit;   /* sb has inode alignment bit set */
 
85
 
 
86
        int             sb_fully_zeroed; /* has zeroed secondary sb sectors */
 
87
} fs_geometry_t;
 
88
 
 
89
typedef struct fs_geo_list  {
 
90
        struct fs_geo_list      *next;
 
91
        int                     refs;
 
92
        int                     index;
 
93
        fs_geometry_t           geo;
 
94
} fs_geo_list_t;
 
95
 
 
96
/*
 
97
 * fields for sb_last_nonzero
 
98
 */
 
99
 
 
100
#define XR_SB_COUNTERS          0x0001
 
101
#define XR_SB_INOALIGN          0x0002
 
102
#define XR_SB_SALIGN            0x0004
 
103
 
 
104
/*
 
105
 * what got modified by verify_set_* routines
 
106
 */
 
107
 
 
108
#define XR_AG_SB        0x1
 
109
#define XR_AG_AGF       0x2
 
110
#define XR_AG_AGI       0x4
 
111
#define XR_AG_SB_SEC    0x8
 
112
 
 
113