Subversion Repositories Kolibri OS

Rev

Rev 9889 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9889 Rev 10007
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2013-2022. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2013-2022. All rights reserved. ;;
4
;;  Distributed under terms of the GNU General Public License   ;;
4
;;  Distributed under terms of the GNU General Public License   ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
7
 
8
$Revision: 9889 $
8
$Revision: 10007 $
9
 
9
 
10
; file types from stat.h
10
; file types from stat.h
11
S_IFMT      = 0170000o  ; These bits determine file type
11
S_IFMT      = 0170000o  ; These bits determine file type
12
S_IFDIR     = 0040000o  ; Directory
12
S_IFDIR     = 0040000o  ; Directory
13
S_IFCHR     = 0020000o  ; Character device
13
S_IFCHR     = 0020000o  ; Character device
14
S_IFBLK     = 0060000o  ; Block device
14
S_IFBLK     = 0060000o  ; Block device
15
S_IFREG     = 0100000o  ; Regular file
15
S_IFREG     = 0100000o  ; Regular file
16
S_IFIFO     = 0010000o  ; FIFO
16
S_IFIFO     = 0010000o  ; FIFO
17
S_IFLNK     = 0120000o  ; Symbolic link
17
S_IFLNK     = 0120000o  ; Symbolic link
18
S_IFSOCK    = 0140000o  ; Socket
18
S_IFSOCK    = 0140000o  ; Socket
19
 
19
 
20
; XFS null constant: empty fields must be all ones, not zeros!
20
; XFS null constant: empty fields must be all ones, not zeros!
21
XFS_NULL                = -1
21
XFS_NULL                = -1
22
 
22
 
23
XFS_SECT_SB             = 0
23
XFS_SECT_SB             = 0
24
 
24
 
25
; signatures of file system structures
25
; signatures of file system structures
26
XFS_AGF_MAGIC           = 'XAGF'
26
XFS_AGF_MAGIC           = 'XAGF'
27
XFS_DINODE_MAGIC        = 'IN'
27
XFS_DINODE_MAGIC        = 'IN'
28
XFS_BMAP_MAGIC          = 'BMAP'
28
XFS_BMAP_MAGIC          = 'BMAP'
29
XFS_DA_NODE_MAGIC       = 0xbefe
29
XFS_DA_NODE_MAGIC       = 0xbefe
30
XFS_DIR2_LEAF1_MAGIC    = 0xf1d2
30
XFS_DIR2_LEAF1_MAGIC    = 0xf1d2
31
XFS_DIR2_LEAFN_MAGIC    = 0xffd2
31
XFS_DIR2_LEAFN_MAGIC    = 0xffd2
32
XFS_DIR2_BLOCK_MAGIC    = 'XD2B'
32
XFS_DIR2_BLOCK_MAGIC    = 'XD2B'
33
XFS_DIR2_DATA_MAGIC     = 'XD2D'
33
XFS_DIR2_DATA_MAGIC     = 'XD2D'
34
 
34
 
35
XFS_BMAP3_MAGIC         = 'BMA3'
35
XFS_BMAP3_MAGIC         = 'BMA3'
36
XFS_DA3_NODE_MAGIC      = 0xbe3e        ; non-leaf blocks
36
XFS_DA3_NODE_MAGIC      = 0xbe3e        ; non-leaf blocks
37
XFS_DIR3_LEAF1_MAGIC    = 0xf13d        ; v3 dir single blks
37
XFS_DIR3_LEAF1_MAGIC    = 0xf13d        ; v3 dir single blks
38
XFS_DIR3_LEAFN_MAGIC    = 0xff3d        ; v3 dir multi blks
38
XFS_DIR3_LEAFN_MAGIC    = 0xff3d        ; v3 dir multi blks
39
XFS_DIR3_BLOCK_MAGIC    = 'XDB3'        ; single block dirs
39
XFS_DIR3_BLOCK_MAGIC    = 'XDB3'        ; single block dirs
40
XFS_DIR3_DATA_MAGIC     = 'XDD3'        ; multiblock dirs
40
XFS_DIR3_DATA_MAGIC     = 'XDD3'        ; multiblock dirs
41
 
41
 
42
XFS_SB_MAGIC               = 'XFSB'
42
XFS_SB_MAGIC               = 'XFSB'
43
XFS_SB_VERSION_NUMBITS     = 0x000f
43
XFS_SB_VERSION_NUMBITS     = 0x000f
44
XFS_SB_VERSION_ALLFBITS    = 0xfff0
44
XFS_SB_VERSION_ALLFBITS    = 0xfff0
45
XFS_SB_VERSION_REALFBITS   = 0x0ff0
45
XFS_SB_VERSION_REALFBITS   = 0x0ff0
46
XFS_SB_VERSION_ATTRBIT     = 0x0010
46
XFS_SB_VERSION_ATTRBIT     = 0x0010
47
XFS_SB_VERSION_NLINKBIT    = 0x0020
47
XFS_SB_VERSION_NLINKBIT    = 0x0020
48
XFS_SB_VERSION_QUOTABIT    = 0x0040
48
XFS_SB_VERSION_QUOTABIT    = 0x0040
49
XFS_SB_VERSION_ALIGNBIT    = 0x0080
49
XFS_SB_VERSION_ALIGNBIT    = 0x0080
50
XFS_SB_VERSION_DALIGNBIT   = 0x0100
50
XFS_SB_VERSION_DALIGNBIT   = 0x0100
51
XFS_SB_VERSION_SHAREDBIT   = 0x0200
51
XFS_SB_VERSION_SHAREDBIT   = 0x0200
52
XFS_SB_VERSION_LOGV2BIT    = 0x0400
52
XFS_SB_VERSION_LOGV2BIT    = 0x0400
53
XFS_SB_VERSION_SECTORBIT   = 0x0800
53
XFS_SB_VERSION_SECTORBIT   = 0x0800
54
XFS_SB_VERSION_EXTFLGBIT   = 0x1000
54
XFS_SB_VERSION_EXTFLGBIT   = 0x1000
55
XFS_SB_VERSION_DIRV2BIT    = 0x2000
55
XFS_SB_VERSION_DIRV2BIT    = 0x2000
56
XFS_SB_VERSION_BORGBIT     = 0x4000     ; ASCII only case-insensitive
56
XFS_SB_VERSION_BORGBIT     = 0x4000     ; ASCII only case-insensitive
57
XFS_SB_VERSION_MOREBITSBIT = 0x8000
57
XFS_SB_VERSION_MOREBITSBIT = 0x8000
58
 
58
 
59
XFS_SB_VERSION_SUPPORTED = XFS_SB_VERSION_NUMBITS     OR \
59
XFS_SB_VERSION_SUPPORTED = XFS_SB_VERSION_NUMBITS     OR \
60
                           XFS_SB_VERSION_ATTRBIT     OR \
60
                           XFS_SB_VERSION_ATTRBIT     OR \
61
                           XFS_SB_VERSION_NLINKBIT    OR \
61
                           XFS_SB_VERSION_NLINKBIT    OR \
62
                           XFS_SB_VERSION_QUOTABIT    OR \
62
                           XFS_SB_VERSION_QUOTABIT    OR \
63
                           XFS_SB_VERSION_ALIGNBIT    OR \
63
                           XFS_SB_VERSION_ALIGNBIT    OR \
64
                           XFS_SB_VERSION_LOGV2BIT    OR \
64
                           XFS_SB_VERSION_LOGV2BIT    OR \
65
                           XFS_SB_VERSION_SECTORBIT   OR \
65
                           XFS_SB_VERSION_SECTORBIT   OR \
66
                           XFS_SB_VERSION_EXTFLGBIT   OR \
66
                           XFS_SB_VERSION_EXTFLGBIT   OR \
67
                           XFS_SB_VERSION_DIRV2BIT    OR \
67
                           XFS_SB_VERSION_DIRV2BIT    OR \
68
                           XFS_SB_VERSION_MOREBITSBIT
68
                           XFS_SB_VERSION_MOREBITSBIT
69
 
69
 
70
XFS_SB_VERSION2_RESERVED1BIT   = 0x00000001
70
XFS_SB_VERSION2_RESERVED1BIT   = 0x00000001
71
XFS_SB_VERSION2_LAZYSBCOUNTBIT = 0x00000002     ; Superblk counters
71
XFS_SB_VERSION2_LAZYSBCOUNTBIT = 0x00000002     ; Superblk counters
72
XFS_SB_VERSION2_RESERVED4BIT   = 0x00000004
72
XFS_SB_VERSION2_RESERVED4BIT   = 0x00000004
73
XFS_SB_VERSION2_ATTR2BIT       = 0x00000008     ; Inline attr rework
73
XFS_SB_VERSION2_ATTR2BIT       = 0x00000008     ; Inline attr rework
74
XFS_SB_VERSION2_PARENTBIT      = 0x00000010     ; parent pointers in xattr
74
XFS_SB_VERSION2_PARENTBIT      = 0x00000010     ; parent pointers in xattr
75
XFS_SB_VERSION2_PROJID32BIT    = 0x00000080     ; 32 bit project id
75
XFS_SB_VERSION2_PROJID32BIT    = 0x00000080     ; 32 bit project id
76
XFS_SB_VERSION2_CRCBIT         = 0x00000100     ; metadata CRCs
76
XFS_SB_VERSION2_CRCBIT         = 0x00000100     ; metadata CRCs
77
XFS_SB_VERSION2_FTYPE          = 0x00000200     ; inode type in dir
77
XFS_SB_VERSION2_FTYPE          = 0x00000200     ; inode type in dir
78
 
78
 
79
XFS_SB_VERSION2_SUPPORTED = XFS_SB_VERSION2_LAZYSBCOUNTBIT OR \
79
XFS_SB_VERSION2_SUPPORTED = XFS_SB_VERSION2_LAZYSBCOUNTBIT OR \
80
                            XFS_SB_VERSION2_ATTR2BIT       OR \
80
                            XFS_SB_VERSION2_ATTR2BIT       OR \
81
                            XFS_SB_VERSION2_PARENTBIT      OR \
81
                            XFS_SB_VERSION2_PARENTBIT      OR \
82
                            XFS_SB_VERSION2_PROJID32BIT    OR \
82
                            XFS_SB_VERSION2_PROJID32BIT    OR \
83
                            XFS_SB_VERSION2_CRCBIT         OR \
83
                            XFS_SB_VERSION2_CRCBIT         OR \
84
                            XFS_SB_VERSION2_FTYPE
84
                            XFS_SB_VERSION2_FTYPE
85
 
85
 
86
XFS_SB_FEAT_INCOMPAT_FTYPE       = 0x01 ; filetype in dirent
86
XFS_SB_FEAT_INCOMPAT_FTYPE       = 0x01 ; filetype in dirent
87
XFS_SB_FEAT_INCOMPAT_SPINODES    = 0x02 ; sparse inode chunks
87
XFS_SB_FEAT_INCOMPAT_SPINODES    = 0x02 ; sparse inode chunks
88
XFS_SB_FEAT_INCOMPAT_META_UUID   = 0x04 ; metadata UUID
88
XFS_SB_FEAT_INCOMPAT_META_UUID   = 0x04 ; metadata UUID
89
XFS_SB_FEAT_INCOMPAT_BIGTIME     = 0x08 ; large timestamps
89
XFS_SB_FEAT_INCOMPAT_BIGTIME     = 0x08 ; large timestamps
90
XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR = 0x10 ; e.g. for upgrade to nrext64
90
XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR = 0x10 ; e.g. for upgrade to nrext64
91
XFS_SB_FEAT_INCOMPAT_NREXT64     = 0x20 ; 64bit extent counters
91
XFS_SB_FEAT_INCOMPAT_NREXT64     = 0x20 ; 64bit extent counters
92
XFS_SB_FEAT_INCOMPAT_SUPPORTED   = XFS_SB_FEAT_INCOMPAT_FTYPE    OR \
92
XFS_SB_FEAT_INCOMPAT_SUPPORTED   = XFS_SB_FEAT_INCOMPAT_FTYPE    OR \
93
                                   XFS_SB_FEAT_INCOMPAT_SPINODES OR \
93
                                   XFS_SB_FEAT_INCOMPAT_SPINODES OR \
94
                                   XFS_SB_FEAT_INCOMPAT_META_UUID OR \
94
                                   XFS_SB_FEAT_INCOMPAT_META_UUID OR \
95
                                   XFS_SB_FEAT_INCOMPAT_BIGTIME OR \
95
                                   XFS_SB_FEAT_INCOMPAT_BIGTIME OR \
96
                                   XFS_SB_FEAT_INCOMPAT_NREXT64
96
                                   XFS_SB_FEAT_INCOMPAT_NREXT64
97
 
97
 
98
; bitfield lengths for packed extent
98
; bitfield lengths for packed extent
99
; MSB to LSB / left to right
99
; MSB to LSB / left to right
100
BMBT_EXNTFLAG_BITLEN    =  1
100
BMBT_EXNTFLAG_BITLEN    =  1
101
BMBT_STARTOFF_BITLEN    = 54
101
BMBT_STARTOFF_BITLEN    = 54
102
BMBT_STARTBLOCK_BITLEN  = 52
102
BMBT_STARTBLOCK_BITLEN  = 52
103
BMBT_BLOCKCOUNT_BITLEN  = 21
103
BMBT_BLOCKCOUNT_BITLEN  = 21
104
 
104
 
105
XFS_DIR2_DATA_ALIGN_LOG = 3
105
XFS_DIR2_DATA_ALIGN_LOG = 3
106
XFS_DIR2_DATA_ALIGN     = 1 SHL XFS_DIR2_DATA_ALIGN_LOG
106
XFS_DIR2_DATA_ALIGN     = 1 SHL XFS_DIR2_DATA_ALIGN_LOG
107
XFS_DIR2_SPACE_SIZE     = (1 SHL (32 + XFS_DIR2_DATA_ALIGN_LOG))
107
XFS_DIR2_SPACE_SIZE     = (1 SHL (32 + XFS_DIR2_DATA_ALIGN_LOG))
108
XFS_DIR2_DATA_OFFSET    = 0*XFS_DIR2_SPACE_SIZE
108
XFS_DIR2_DATA_OFFSET    = 0*XFS_DIR2_SPACE_SIZE
109
XFS_DIR2_LEAF_OFFSET    = 1*XFS_DIR2_SPACE_SIZE
109
XFS_DIR2_LEAF_OFFSET    = 1*XFS_DIR2_SPACE_SIZE
110
XFS_DIR2_FREE_OFFSET    = 2*XFS_DIR2_SPACE_SIZE
110
XFS_DIR2_FREE_OFFSET    = 2*XFS_DIR2_SPACE_SIZE
111
 
111
 
112
; data section magic constants for directories (xfs_dir2_data.h)
112
; data section magic constants for directories (xfs_dir2_data.h)
113
XFS_DIR2_DATA_FD_COUNT  = 3
113
XFS_DIR2_DATA_FD_COUNT  = 3
114
 
114
 
115
; valid inode formats
115
; valid inode formats
116
; enum xfs_dinode_fmt (xfs_dinode.h)
116
; enum xfs_dinode_fmt (xfs_dinode.h)
117
XFS_DINODE_FMT_DEV      = 0
117
XFS_DINODE_FMT_DEV      = 0
118
XFS_DINODE_FMT_LOCAL    = 1
118
XFS_DINODE_FMT_LOCAL    = 1
119
XFS_DINODE_FMT_EXTENTS  = 2
119
XFS_DINODE_FMT_EXTENTS  = 2
120
XFS_DINODE_FMT_BTREE    = 3
120
XFS_DINODE_FMT_BTREE    = 3
121
XFS_DINODE_FMT_UUID     = 4
121
XFS_DINODE_FMT_UUID     = 4
122
 
122
 
123
; size of the unlinked inode hash table in the agi
123
; size of the unlinked inode hash table in the agi
124
XFS_AGI_UNLINKED_BUCKETS = 64
124
XFS_AGI_UNLINKED_BUCKETS = 64
125
 
125
 
126
; possible extent states
126
; possible extent states
127
; enum xfs_exntst_t (xfs_bmap_btree.h)
127
; enum xfs_exntst_t (xfs_bmap_btree.h)
128
XFS_EXT_NORM            = 0
128
XFS_EXT_NORM            = 0
129
XFS_EXT_UNWRITTEN       = 1
129
XFS_EXT_UNWRITTEN       = 1
130
XFS_EXT_DMAPI_OFFLINE   = 2
130
XFS_EXT_DMAPI_OFFLINE   = 2
131
XFS_EXT_INVALID         = 3
131
XFS_EXT_INVALID         = 3
132
 
132
 
133
; values for inode core flags / di_flags (xfs_dinode.h)
133
; values for inode core flags / di_flags (xfs_dinode.h)
134
XFS_DIFLAG_REALTIME_BIT     =  0        ; file's blocks come from rt area
134
XFS_DIFLAG_REALTIME_BIT     =  0        ; file's blocks come from rt area
135
XFS_DIFLAG_PREALLOC_BIT     =  1        ; file space has been preallocated
135
XFS_DIFLAG_PREALLOC_BIT     =  1        ; file space has been preallocated
136
XFS_DIFLAG_NEWRTBM_BIT      =  2        ; for rtbitmap inode, new format
136
XFS_DIFLAG_NEWRTBM_BIT      =  2        ; for rtbitmap inode, new format
137
XFS_DIFLAG_NODUMP_BIT       =  7        ; do not dump
137
XFS_DIFLAG_NODUMP_BIT       =  7        ; do not dump
138
XFS_DIFLAG_REALTIME         = (1 SHL XFS_DIFLAG_REALTIME_BIT)
138
XFS_DIFLAG_REALTIME         = (1 SHL XFS_DIFLAG_REALTIME_BIT)
139
XFS_DIFLAG_PREALLOC         = (1 SHL XFS_DIFLAG_PREALLOC_BIT)
139
XFS_DIFLAG_PREALLOC         = (1 SHL XFS_DIFLAG_PREALLOC_BIT)
140
XFS_DIFLAG_NEWRTBM          = (1 SHL XFS_DIFLAG_NEWRTBM_BIT)
140
XFS_DIFLAG_NEWRTBM          = (1 SHL XFS_DIFLAG_NEWRTBM_BIT)
141
XFS_DIFLAG_NODUMP           = (1 SHL XFS_DIFLAG_NODUMP_BIT)
141
XFS_DIFLAG_NODUMP           = (1 SHL XFS_DIFLAG_NODUMP_BIT)
142
 
142
 
143
; superblock _ondisk_ structure (xfs_sb.h)
143
; superblock _ondisk_ structure (xfs_sb.h)
144
; this is _not_ the partition structure
144
; this is _not_ the partition structure
145
; for XFS partition structure see XFS below
145
; for XFS partition structure see XFS below
146
struct xfs_sb
146
struct xfs_sb
147
        sb_magicnum              dd ?   ; signature, must be XFS_SB_MAGIC
147
        sb_magicnum              dd ?   ; signature, must be XFS_SB_MAGIC
148
        sb_blocksize             dd ?   ; block is the minimal file system unit, in bytes
148
        sb_blocksize             dd ?   ; block is the minimal file system unit, in bytes
149
        sb_dblocks               DQ ?   ; number of data blocks
149
        sb_dblocks               DQ ?   ; number of data blocks
150
        sb_rblocks               DQ ?   ; number of realtime blocks
150
        sb_rblocks               DQ ?   ; number of realtime blocks
151
        sb_rextents              DQ ?   ; number of realtime extents
151
        sb_rextents              DQ ?   ; number of realtime extents
152
        sb_uuid                  rb 16  ; file system unique identifier
152
        sb_uuid                  rb 16  ; file system unique identifier
153
        sb_logstart              DQ ?   ; starting block of log (for internal journal)
153
        sb_logstart              DQ ?   ; starting block of log (for internal journal)
154
        sb_rootino               DQ ?   ; root inode number
154
        sb_rootino               DQ ?   ; root inode number
155
        sb_rbmino                DQ ?   ; bitmap inode for realtime extents
155
        sb_rbmino                DQ ?   ; bitmap inode for realtime extents
156
        sb_rsumino               DQ ?   ; summary inode for rt bitmap
156
        sb_rsumino               DQ ?   ; summary inode for rt bitmap
157
        sb_rextsize              dd ?   ; realtime extent size, blocks
157
        sb_rextsize              dd ?   ; realtime extent size, blocks
158
        sb_agblocks              dd ?   ; size of an allocation group (the last one may be smaller!)
158
        sb_agblocks              dd ?   ; size of an allocation group (the last one may be smaller!)
159
        sb_agcount               dd ?   ; number of allocation groups
159
        sb_agcount               dd ?   ; number of allocation groups
160
        sb_rbmblocks             dd ?   ; number of rt bitmap blocks
160
        sb_rbmblocks             dd ?   ; number of rt bitmap blocks
161
        sb_logblocks             dd ?   ; number of log blocks
161
        sb_logblocks             dd ?   ; number of log blocks
162
        sb_versionnum            dw ?   ; header version
162
        sb_versionnum            dw ?   ; header version
163
        sb_sectsize              dw ?   ; volume sector size in bytes
163
        sb_sectsize              dw ?   ; volume sector size in bytes
164
        sb_inodesize             dw ?   ; inode size, bytes
164
        sb_inodesize             dw ?   ; inode size, bytes
165
        sb_inopblock             dw ?   ; inodes per block
165
        sb_inopblock             dw ?   ; inodes per block
166
        sb_fname                 rb 12  ; inodes per block (aka label)
166
        sb_fname                 rb 12  ; inodes per block (aka label)
167
        sb_blocklog              db ?   ; log2 of sb_blocksize
167
        sb_blocklog              db ?   ; log2 of sb_blocksize
168
        sb_sectlog               db ?   ; log2 of sb_blocksize
168
        sb_sectlog               db ?   ; log2 of sb_blocksize
169
        sb_inodelog              db ?   ; log2 of sb_inodesize
169
        sb_inodelog              db ?   ; log2 of sb_inodesize
170
        sb_inopblog              db ?   ; log2 of sb_inopblock
170
        sb_inopblog              db ?   ; log2 of sb_inopblock
171
        sb_agblklog              db ?   ; log2 of sb_agblocks (rounded up!)
171
        sb_agblklog              db ?   ; log2 of sb_agblocks (rounded up!)
172
        sb_rextslog              db ?   ; log2 of sb_rextents
172
        sb_rextslog              db ?   ; log2 of sb_rextents
173
        sb_inprogress            db ?   ; mkfs is in progress, don't mount
173
        sb_inprogress            db ?   ; mkfs is in progress, don't mount
174
        sb_imax_pct              db ?   ; max % of fs for inode space
174
        sb_imax_pct              db ?   ; max % of fs for inode space
175
        ; statistics
175
        ; statistics
176
        sb_icount                DQ ?   ; allocated inodes
176
        sb_icount                DQ ?   ; allocated inodes
177
        sb_ifree                 DQ ?   ; free inodes
177
        sb_ifree                 DQ ?   ; free inodes
178
        sb_fdblocks              DQ ?   ; free data blocks
178
        sb_fdblocks              DQ ?   ; free data blocks
179
        sb_frextents             DQ ?   ; free realtime extents
179
        sb_frextents             DQ ?   ; free realtime extents
180
 
180
 
181
        sb_uquotino              DQ ?   ; user quota inode
181
        sb_uquotino              DQ ?   ; user quota inode
182
        sb_gquotino              DQ ?   ; group quota inode
182
        sb_gquotino              DQ ?   ; group quota inode
183
        sb_qflags                dw ?   ; quota flags
183
        sb_qflags                dw ?   ; quota flags
184
        sb_flags                 db ?   ; misc. flags
184
        sb_flags                 db ?   ; misc. flags
185
        sb_shared_vn             db ?   ; shared version number
185
        sb_shared_vn             db ?   ; shared version number
186
        sb_inoalignmt            dd ?   ; inode chunk alignment, fsblocks
186
        sb_inoalignmt            dd ?   ; inode chunk alignment, fsblocks
187
        sb_unit                  dd ?   ; stripe or raid unit
187
        sb_unit                  dd ?   ; stripe or raid unit
188
        sb_width                 dd ?   ; stripe or raid width
188
        sb_width                 dd ?   ; stripe or raid width
189
        sb_dirblklog             db ?   ; log2 of dir block size (fsbs)
189
        sb_dirblklog             db ?   ; log2 of dir block size (fsbs)
190
        sb_logsectlog            db ?   ; log2 of the log sector size
190
        sb_logsectlog            db ?   ; log2 of the log sector size
191
        sb_logsectsize           dw ?   ; sector size for the log, bytes
191
        sb_logsectsize           dw ?   ; sector size for the log, bytes
192
        sb_logsunit              dd ?   ; stripe unit size for the log
192
        sb_logsunit              dd ?   ; stripe unit size for the log
193
        sb_features2             dd ?   ; additional feature bits
193
        sb_features2             dd ?   ; additional feature bits
194
        sb_bad_features2         dd ?
194
        sb_bad_features2         dd ?
195
        sb_features_compat       dd ?
195
        sb_features_compat       dd ?
196
        sb_features_ro_compat    dd ?
196
        sb_features_ro_compat    dd ?
197
        sb_features_incompat     dd ?
197
        sb_features_incompat     dd ?
198
        sb_features_log_incompat dd ?
198
        sb_features_log_incompat dd ?
199
        sb_crc                   dd ?   ; superblock crc
199
        sb_crc                   dd ?   ; superblock crc
200
        sb_spino_align           dd ?   ; sparse inode chunk alignment
200
        sb_spino_align           dd ?   ; sparse inode chunk alignment
201
        sb_pquotino              DQ ?   ; project quota inode
201
        sb_pquotino              DQ ?   ; project quota inode
202
        sb_lsn                   DQ ?   ; last write sequence
202
        sb_lsn                   DQ ?   ; last write sequence
203
        sb_meta_uuid             rb 16  ; metadata file system unique id
203
        sb_meta_uuid             rb 16  ; metadata file system unique id
204
ends
204
ends
205
 
205
 
206
; inode core structure: basic information about file
206
; inode core structure: basic information about file
207
struct xfs_dinode_core
207
struct xfs_dinode_core
208
        di_magic         dw ?           ; inode magic = XFS_DINODE_MAGIC
208
        di_magic         dw ?           ; inode magic = XFS_DINODE_MAGIC
209
        di_mode          dw ?           ; mode and type of file
209
        di_mode          dw ?           ; mode and type of file
210
        di_version       db ?           ; inode version
210
        di_version       db ?           ; inode version
211
        di_format        db ?           ; format of di_c data
211
        di_format        db ?           ; format of di_c data
212
        di_onlink        dw ?           ; old number of links to file
212
        di_onlink        dw ?           ; old number of links to file
213
        di_uid           dd ?           ; owner's user id
213
        di_uid           dd ?           ; owner's user id
214
        di_gid           dd ?           ; owner's group id
214
        di_gid           dd ?           ; owner's group id
215
        di_nlink         dd ?           ; number of links to file
215
        di_nlink         dd ?           ; number of links to file
216
        di_projid        dd ?           ; owner's project id
216
        di_projid        dd ?           ; owner's project id
217
        di_big_nextents  DQ ?           ; iff NREXT64 is set
217
        di_big_nextents  DQ ?           ; iff NREXT64 is set
218
        di_atime         DQ             ; time last accessed
218
        di_atime         DQ             ; time last accessed
219
        di_mtime         DQ               ; time last modified
219
        di_mtime         DQ               ; time last modified
220
        di_ctime         DQ             ; time created/inode modified
220
        di_ctime         DQ             ; time created/inode modified
221
        di_size          DQ ?           ; number of bytes in file
221
        di_size          DQ ?           ; number of bytes in file
222
        di_nblocks       DQ ?           ; number of direct & btree blocks used
222
        di_nblocks       DQ ?           ; number of direct & btree blocks used
223
        di_extsize       dd ?           ; basic/minimum extent size for file
223
        di_extsize       dd ?           ; basic/minimum extent size for file
224
        union
224
        union
225
            struct
225
            struct
226
                di_nextents      dd ?   ; number of extents in data fork
226
                di_nextents      dd ?   ; number of extents in data fork
227
                di_anextents     dw ?   ; number of extents in attribute fork
227
                di_anextents     dw ?   ; number of extents in attribute fork
228
            ends
228
            ends
229
            struct
229
            struct
230
                di_big_anextents dd ?   ; attr extent counter is 32bit for NREXT64
230
                di_big_anextents dd ?   ; attr extent counter is 32bit for NREXT64
231
                di_nrext64_pad   dw ?
231
                di_nrext64_pad   dw ?
232
            ends
232
            ends
233
        ends
233
        ends
234
        di_forkoff       db ?           ; attr fork offs, <<3 for 64b align
234
        di_forkoff       db ?           ; attr fork offs, <<3 for 64b align
235
        di_aformat       db ?           ; format of attr fork's data
235
        di_aformat       db ?           ; format of attr fork's data
236
        di_dmevmask      dd ?           ; DMIG event mask
236
        di_dmevmask      dd ?           ; DMIG event mask
237
        di_dmstate       dw ?           ; DMIG state info
237
        di_dmstate       dw ?           ; DMIG state info
238
        di_flags         dw ?           ; random flags, XFS_DIFLAG_...
238
        di_flags         dw ?           ; random flags, XFS_DIFLAG_...
239
        di_gen           dd ?           ; generation number
239
        di_gen           dd ?           ; generation number
240
        di_next_unlinked dd ?           ; unlinked but still used inode (if any, XFS_NULL otherwise)
240
        di_next_unlinked dd ?           ; unlinked but still used inode (if any, XFS_NULL otherwise)
241
ends
241
ends
242
 
242
 
243
struct xfs_dinode3_core xfs_dinode_core
243
struct xfs_dinode3_core xfs_dinode_core
244
        di_crc           dd ?           ; CRC of the inode
244
        di_crc           dd ?           ; CRC of the inode
245
        di_changecount   DQ ?           ; number of attribute changes
245
        di_changecount   DQ ?           ; number of attribute changes
246
        di_lsn           DQ ?           ; flush sequence
246
        di_lsn           DQ ?           ; flush sequence
247
        di_flags2        DQ ?           ; more random flags
247
        di_flags2        DQ ?           ; more random flags
248
        di_cowextsize    dd ?           ; basic cow extent size for file
248
        di_cowextsize    dd ?           ; basic cow extent size for file
249
        di_pad2          rb 12          ; more padding for future expansion
249
        di_pad2          rb 12          ; more padding for future expansion
250
 
250
 
251
        ; fields only written to during inode creation
251
        ; fields only written to during inode creation
252
        di_crtime        DQ             ; time created
252
        di_crtime        DQ             ; time created
253
        di_ino           DQ ?           ; inode number
253
        di_ino           DQ ?           ; inode number
254
        di_uuid          rb 16          ; UUID of the filesystem
254
        di_uuid          rb 16          ; UUID of the filesystem
255
ends
255
ends
256
 
256
 
257
 
257
 
258
struct xfs_dir2_sf_hdr
258
struct xfs_dir2_sf_hdr
259
        count           db ?
259
        count           db ?
260
        i8count         db ?
260
        i8count         db ?
261
        parent          DQ ?            ; parent inode number, 4 or 8 bytes
261
        parent          DQ ?            ; parent inode number, 4 or 8 bytes
262
ends         
262
ends         
263
 
263
 
264
struct xfs_dir2_sf_entry
264
struct xfs_dir2_sf_entry
265
        namelen         db ?            ; actual name length (ASCII)
265
        namelen         db ?            ; actual name length (ASCII)
266
        offset          rb 2            ; saved offset
266
        offset          rb 2            ; saved offset
267
        name            db ?            ; name, variable size
267
        name            db ?            ; name, variable size
268
        inumber         DQ ?            ; 4 or 8 bytes
268
        inumber         DQ ?            ; 4 or 8 bytes
269
ends
269
ends
270
 
270
 
271
struct xfs_dir2_sf
271
struct xfs_dir2_sf
272
        hdr     xfs_dir2_sf_hdr
272
        hdr     xfs_dir2_sf_hdr
273
        entries xfs_dir2_sf_entry
273
        entries xfs_dir2_sf_entry
274
ends
274
ends
275
 
275
 
276
; active entry in a data block
276
; active entry in a data block
277
; aligned to 8 bytes
277
; aligned to 8 bytes
278
; tag appears as the last 2 bytes
278
; tag appears as the last 2 bytes
279
struct xfs_dir2_data_entry
279
struct xfs_dir2_data_entry
280
        inumber         DQ ?
280
        inumber         DQ ?
281
        namelen         db ?
281
        namelen         db ?
282
        name            db ?            ; name bytes array without terminator
282
        name            db ?            ; name bytes array without terminator
283
;       tag             dw ?            ; starting offset of the entry
283
;       tag             dw ?            ; starting offset of the entry
284
ends
284
ends
285
 
285
 
286
; unused entry in a data block
286
; unused entry in a data block
287
struct xfs_dir2_data_unused
287
struct xfs_dir2_data_unused
288
        freetag         dw ?            ; XFS_DIR2_DATA_FREE_TAG aka XFS_NULL
288
        freetag         dw ?            ; XFS_DIR2_DATA_FREE_TAG aka XFS_NULL
289
        length          dw ?            ; total free length
289
        length          dw ?            ; total free length
290
;        tag             dw ?           ; starting offset of the entry
290
;        tag             dw ?           ; starting offset of the entry
291
ends
291
ends
292
 
292
 
293
; generic data entry
293
; generic data entry
294
struct xfs_dir2_data_union
294
struct xfs_dir2_data_union
295
  union
295
  union
296
        xentry          xfs_dir2_data_entry
296
        xentry          xfs_dir2_data_entry
297
        unused          xfs_dir2_data_unused
297
        unused          xfs_dir2_data_unused
298
  ends
298
  ends
299
ends
299
ends
300
 
300
 
301
; describe a free area in the data block
301
; describe a free area in the data block
302
; the freespace will be formatted as a xfs_dir2_data_unused_t
302
; the freespace will be formatted as a xfs_dir2_data_unused_t
303
struct xfs_dir2_data_free
303
struct xfs_dir2_data_free
304
        offset          dw ?            ; start of freespace
304
        offset          dw ?            ; start of freespace
305
        length          dw ?            ; length of freespace
305
        length          dw ?            ; length of freespace
306
ends
306
ends
307
 
307
 
308
; header for the data blocks
308
; header for the data blocks
309
; always at the beginning of a directory-sized block
309
; always at the beginning of a directory-sized block
310
; the code knows that XFS_DIR2_DATA_FD_COUNT is 3
310
; the code knows that XFS_DIR2_DATA_FD_COUNT is 3
311
struct xfs_dir2_data_hdr
311
struct xfs_dir2_data_hdr
312
        magic           dd ?            ; XFS_DIR2_DATA_MAGIC or XFS_DIR2_BLOCK_MAGIC
312
        magic           dd ?            ; XFS_DIR2_DATA_MAGIC or XFS_DIR2_BLOCK_MAGIC
313
        bestfree        xfs_dir2_data_free
313
        bestfree        xfs_dir2_data_free
314
        bestfree2       xfs_dir2_data_free
314
        bestfree2       xfs_dir2_data_free
315
        bestfree3       xfs_dir2_data_free
315
        bestfree3       xfs_dir2_data_free
316
ends
316
ends
317
 
317
 
318
struct xfs_dir3_data_hdr xfs_dir2_data_hdr
318
struct xfs_dir3_data_hdr xfs_dir2_data_hdr
319
        magic3  dd ?
319
        magic3  dd ?
320
        crc     dd ?
320
        crc     dd ?
321
        blkno   DQ ?
321
        blkno   DQ ?
322
        lsn     DQ ?
322
        lsn     DQ ?
323
        uuid    rb 16
323
        uuid    rb 16
324
        owner   DQ ?
324
        owner   DQ ?
325
ends
325
ends
326
 
326
 
327
; leaf block entry
327
; leaf block entry
328
struct xfs_dir2_leaf_entry
328
struct xfs_dir2_leaf_entry
329
        hashval         dd ?            ; hash value of name
329
        hashval         dd ?            ; hash value of name
330
        address         dd ?            ; address of data entry
330
        address         dd ?            ; address of data entry
331
ends
331
ends
332
 
332
 
333
; the tail of directory block
333
; the tail of directory block
334
struct xfs_dir2_block_tail
334
struct xfs_dir2_block_tail
335
        count           dd ?            ; count of leaf entries
335
        count           dd ?            ; count of leaf entries
336
        stale           dd ?            ; count of stale leaf entries
336
        stale           dd ?            ; count of stale leaf entries
337
ends
337
ends
338
 
338
 
339
; generic single-block structure, for xfs_db
339
; generic single-block structure, for xfs_db
340
struct xfs_dir2_block
340
struct xfs_dir2_block
341
        hdr             xfs_dir2_data_hdr       ; magic XFS_DIR2_DATA_MAGIC
341
        hdr             xfs_dir2_data_hdr       ; magic XFS_DIR2_DATA_MAGIC
342
        u               xfs_dir2_data_union
342
        u               xfs_dir2_data_union
343
;        leaf            xfs_dir2_leaf_entry
343
;        leaf            xfs_dir2_leaf_entry
344
;        tail            xfs_dir2_block_tail
344
;        tail            xfs_dir2_block_tail
345
ends
345
ends
346
 
346
 
347
struct xfs_da_blkinfo
347
struct xfs_da_blkinfo
348
        forw            dd ?            ; previous block in list
348
        forw            dd ?            ; previous block in list
349
        back            dd ?            ; following block in list
349
        back            dd ?            ; following block in list
350
        magic           dw ?            ; validity check on block
350
        magic           dw ?            ; validity check on block
351
        pad             dw ?            ; unused
351
        pad             dw ?            ; unused
352
ends
352
ends
353
 
353
 
354
struct xfs_dir2_leaf_hdr
354
struct xfs_dir2_leaf_hdr
355
        info            xfs_da_blkinfo
355
        info            xfs_da_blkinfo
356
        count           dw ?
356
        count           dw ?
357
        stale           dw ?
357
        stale           dw ?
358
ends
358
ends
359
 
359
 
360
struct xfs_da3_blkinfo xfs_da_blkinfo
360
struct xfs_da3_blkinfo xfs_da_blkinfo
361
        crc   dd ?      ; CRC of block
361
        crc   dd ?      ; CRC of block
362
        blkno DQ ?      ; first block of the buffer
362
        blkno DQ ?      ; first block of the buffer
363
        lsn   DQ ?      ; sequence number of last write
363
        lsn   DQ ?      ; sequence number of last write
364
        uuid  rb 16     ; filesystem we belong to
364
        uuid  rb 16     ; filesystem we belong to
365
        owner DQ ?      ; inode that owns the block
365
        owner DQ ?      ; inode that owns the block
366
ends
366
ends
367
 
367
 
368
struct xfs_dir3_leaf_hdr
368
struct xfs_dir3_leaf_hdr
369
        info            xfs_da3_blkinfo
369
        info            xfs_da3_blkinfo
370
        count           dw ?
370
        count           dw ?
371
        stale           dw ?
371
        stale           dw ?
372
        pad             dd ?
372
        pad             dd ?
373
ends
373
ends
374
 
374
 
375
; bests and tail are at the end of the block for single-leaf only
375
; bests and tail are at the end of the block for single-leaf only
376
; (magic = XFS_DIR2_LEAF1_MAGIC not XFS_DIR2_LEAFN_MAGIC)
376
; (magic = XFS_DIR2_LEAF1_MAGIC not XFS_DIR2_LEAFN_MAGIC)
377
struct xfs_dir2_leaf
377
struct xfs_dir2_leaf
378
        hdr             xfs_dir2_leaf_hdr
378
        hdr             xfs_dir2_leaf_hdr
379
        ents            xfs_dir2_leaf_entry
379
        ents            xfs_dir2_leaf_entry
380
;       bests           dw ?
380
;       bests           dw ?
381
;       tail            xfs_dir2_leaf_tail
381
;       tail            xfs_dir2_leaf_tail
382
ends
382
ends
383
 
383
 
384
struct xfs_dir3_leaf
384
struct xfs_dir3_leaf
385
        hdr             xfs_dir3_leaf_hdr
385
        hdr             xfs_dir3_leaf_hdr
386
        ents            xfs_dir2_leaf_entry
386
        ents            xfs_dir2_leaf_entry
387
;       bests
387
;       bests
388
;       tail
388
;       tail
389
ends
389
ends
390
 
390
 
391
struct xfs_dir2_free_hdr
391
struct xfs_dir2_free_hdr
392
        magic           dd ?    ; XFS_DIR2_FREE_MAGIC
392
        magic           dd ?    ; XFS_DIR2_FREE_MAGIC
393
        firstdb         dd ?    ; db of first entry
393
        firstdb         dd ?    ; db of first entry
394
        nvalid          dd ?    ; count of valid entries
394
        nvalid          dd ?    ; count of valid entries
395
        nused           dd ?    ; count of used entries
395
        nused           dd ?    ; count of used entries
396
ends
396
ends
397
 
397
 
398
struct xfs_da_node_hdr
398
struct xfs_da_node_hdr
399
        info            xfs_da_blkinfo
399
        info            xfs_da_blkinfo
400
        count           dw ?
400
        count           dw ?
401
        level           dw ?
401
        level           dw ?
402
ends
402
ends
403
 
403
 
404
struct xfs_da_node_entry
404
struct xfs_da_node_entry
405
        hashval         dd ?            ; hash value for this descendant
405
        hashval         dd ?            ; hash value for this descendant
406
        before          dd ?            ; Btree block before this key
406
        before          dd ?            ; Btree block before this key
407
ends
407
ends
408
 
408
 
409
struct xfs_da_intnode
409
struct xfs_da_intnode
410
        hdr             xfs_da_node_hdr
410
        hdr             xfs_da_node_hdr
411
        btree           xfs_da_node_entry
411
        btree           xfs_da_node_entry
412
ends
412
ends
413
 
413
 
414
struct xfs_da3_node_hdr
414
struct xfs_da3_node_hdr
415
        info            xfs_da3_blkinfo
415
        info            xfs_da3_blkinfo
416
        count           dw ?
416
        count           dw ?
417
        level           dw ?
417
        level           dw ?
418
        pad             dd ?
418
        pad             dd ?
419
ends
419
ends
420
 
420
 
421
struct xfs_da3_intnode
421
struct xfs_da3_intnode
422
        hdr             xfs_da3_node_hdr
422
        hdr             xfs_da3_node_hdr
423
        btree           xfs_da_node_entry
423
        btree           xfs_da_node_entry
424
ends
424
ends
425
 
425
 
426
; packet extent
426
; packet extent
427
struct xfs_bmbt_rec
427
struct xfs_bmbt_rec
428
        l0              DQ ?
428
        l0              DQ ?
429
        l1              DQ ?
429
        l1              DQ ?
430
ends
430
ends
431
 
431
 
432
; unpacked extent
432
; unpacked extent
433
struct xfs_bmbt_irec
433
struct xfs_bmbt_irec
434
        br_startoff     DQ ?
434
        br_startoff     DQ ?
435
        br_startblock   DQ ?
435
        br_startblock   DQ ?
436
        br_blockcount   dd ?
436
        br_blockcount   dd ?
437
        br_state        dd ?
437
        br_state        dd ?
438
ends
438
ends
439
 
439
 
440
struct xfs_dir2_bmx
440
struct xfs_dir2_bmx
441
        bmx     xfs_bmbt_rec
441
        bmx     xfs_bmbt_rec
442
ends
442
ends
443
 
443
 
444
; bmap root header
444
; bmap root header
445
struct xfs_bmdr_block
445
struct xfs_bmdr_block
446
        bb_level        dw ?            ; 0 is a leaf
446
        bb_level        dw ?            ; 0 is a leaf
447
        bb_numrecs      dw ?            ; current number of data records
447
        bb_numrecs      dw ?            ; current number of data records
448
ends
448
ends
449
 
449
 
450
; key structure for non-leaf levels of the tree
450
; key structure for non-leaf levels of the tree
451
struct xfs_bmbt_key
451
struct xfs_bmbt_key
452
        br_startoff     DQ ?            ; starting file offset
452
        br_startoff     DQ ?            ; starting file offset
453
ends
453
ends
454
 
454
 
455
struct xfs_bmdr_ptr DQ
455
struct xfs_bmdr_ptr DQ
456
ends
456
ends
457
 
457
 
458
struct xfs_bmbt_ptr DQ
458
struct xfs_bmbt_ptr DQ
459
ends
459
ends
460
 
460
 
461
; long form header: bmap btrees
461
; long form header: bmap btrees
462
; xfs_btree_lblock is xfs_bmbt_block (xfs_btree.h)
462
; xfs_btree_lblock is xfs_bmbt_block (xfs_btree.h)
463
struct xfs_bmbt_block
463
struct xfs_bmbt_block
464
        bb_magic        dd ?            ; magic number for block type
464
        bb_magic        dd ?            ; magic number for block type
465
        bb_level        dw ?            ; 0 is a leaf
465
        bb_level        dw ?            ; 0 is a leaf
466
        bb_numrecs      dw ?            ; current number of data records
466
        bb_numrecs      dw ?            ; current number of data records
467
        bb_leftsib      DQ ?            ; left sibling block or NULLDFSBNO
467
        bb_leftsib      DQ ?            ; left sibling block or NULLDFSBNO
468
        bb_rightsib     DQ ?            ; right sibling block or NULLDFSBNO
468
        bb_rightsib     DQ ?            ; right sibling block or NULLDFSBNO
469
ends
469
ends
470
 
470
 
471
struct xfs_bmbt3_block xfs_bmbt_block
471
struct xfs_bmbt3_block xfs_bmbt_block
472
        bb_blkno        DQ ?
472
        bb_blkno        DQ ?
473
        bb_lsn          DQ ?
473
        bb_lsn          DQ ?
474
        bb_uuid         rb 16
474
        bb_uuid         rb 16
475
        bb_owner        DQ ?
475
        bb_owner        DQ ?
476
        bb_crc          dd ?
476
        bb_crc          dd ?
477
        bb_pad          dd ?
477
        bb_pad          dd ?
478
ends
478
ends
479
 
479
 
480
struct xfs_inode
480
struct xfs_inode
481
        di_core                 xfs_dinode_core ; main info, aka core
481
        di_core                 xfs_dinode_core ; main info, aka core
482
ends
482
ends
483
 
483
 
484
; internal data for every XFS partition
484
; internal data for every XFS partition
485
; this _is_ XFS partition structure
485
; this _is_ XFS partition structure
486
; most fields are unpacked or bswap'ed values of the superblock, see xfs_sb structure above
486
; most fields are unpacked or bswap'ed values of the superblock, see xfs_sb structure above
487
struct XFS PARTITION
487
struct XFS PARTITION
488
        Lock                    MUTEX ?         ; access mutex
488
        Lock                    MUTEX ?         ; access mutex
489
        sectsize                dd ?
489
        sectsize                dd ?
490
        blocksize               dd ?
490
        blocksize               dd ?
491
        dirblocksize            dd ?
491
        dirblocksize            dd ?
492
        inodesize               dd ?
492
        inodesize               dd ?
493
        rootino                 DQ ?
493
        rootino                 DQ ?
494
        versionnum              dd ?
494
        versionnum              dd ?
495
        version                 dd ?
495
        version                 dd ?
496
        features2               dd ?
496
        features2               dd ?
497
        inopblock               dd ?
497
        inopblock               dd ?
498
        blkpdirblk              dd ?
498
        blkpdirblk              dd ?
499
        blocklog                dd ?
499
        blocklog                dd ?
500
        sectlog                 dd ?
500
        sectlog                 dd ?
501
        inodelog                dd ?
501
        inodelog                dd ?
502
        inopblog                dd ?
502
        inopblog                dd ?
503
        agblklog                dd ?
503
        agblklog                dd ?
504
        sectpblog               dd ?
504
        sectpblog               dd ?
505
        dirblklog               dd ?    ; in fsblocks
505
        dirblklog               dd ?    ; in fsblocks
506
        sectpblock              dd ?
506
        sectpblock              dd ?
507
        agblocks                dd ?
507
        agblocks                dd ?
508
        dir2_leaf_offset_blocks DQ ?
508
        dir2_leaf_offset_blocks DQ ?
509
        dir2_free_offset_blocks DQ ?
509
        dir2_free_offset_blocks DQ ?
510
        agblockmask             DQ ?
510
        agblockmask             DQ ?
511
        inode_core_size         dd ?
511
        inode_core_size         dd ?
512
        features_incompat       dd ?
512
        features_incompat       dd ?
513
        ftype_size              dd ?
513
        ftype_size              dd ?
514
        dir_block_magic         dd ?
514
        dir_block_magic         dd ?
515
        dir_data_magic          dd ?
515
        dir_data_magic          dd ?
516
        dir_leaf1_magic         dw ?
516
        dir_leaf1_magic         dw ?
517
        dir_leafn_magic         dw ?
517
        dir_leafn_magic         dw ?
518
        da_node_magic           dw ?
518
        da_node_magic           dw ?
519
        bmap_magic              dd ?
519
        bmap_magic              dd ?
-
 
520
        dirx_leaf_ents_offset   dd ?
-
 
521
        dirx_leaf_hdr_count_offset dd ?
520
        bmbt_block_size         dd ?
522
        bmbt_block_size         dd ?
521
        dir_block_size          dd ?
523
        dir_block_size          dd ?
522
        dir_data_size           dd ?
524
        dir_data_size           dd ?
523
        dir_leaf1_size          dd ?
525
        dir_leaf1_size          dd ?
524
        dir_leafn_size          dd ?
526
        dir_leafn_size          dd ?
525
        da_node_size            dd ?
527
        da_node_size            dd ?
526
        da_blkinfo_size         dd ?
528
        da_blkinfo_size         dd ?
527
        conv_time_to_kos_epoch  dd ?
529
        conv_time_to_kos_epoch  dd ?
528
        nextents_offset         dd ?
530
        nextents_offset         dd ?
529
        ; helpers, temporary vars, etc
531
        ; helpers, temporary vars, etc
530
        ; should go to file descriptor and local vars?
532
        ; should go to file descriptor and local vars?
531
        cur_block               dd ?
533
        cur_block               dd ?
532
        cur_block_data          dd ?
534
        cur_block_data          dd ?
533
        cur_inode               dd ?
535
        cur_inode               dd ?
534
        cur_sect                dd ?
536
        cur_sect                dd ?
535
        cur_dirblock            dd ?
537
        cur_dirblock            dd ?
536
        tmp_inode               dd ?
538
        tmp_inode               dd ?
537
        extent                  xfs_bmbt_irec
539
        extent                  xfs_bmbt_irec
538
        bytes_to_read           dd ?
540
        bytes_to_read           dd ?
539
        bytes_read              dd ?
541
        bytes_read              dd ?
540
        bytes_left_in_file      DQ ?
542
        bytes_left_in_file      DQ ?
541
        file_offset             DQ ?
543
        file_offset             DQ ?
542
        file_buffer             dd ?
544
        file_buffer             dd ?
543
        entries_read            dd ?
545
        entries_read            dd ?
544
        requested_cnt           dd ?
546
        requested_cnt           dd ?
545
        dir_sf_self_done        dd ?
547
        dir_sf_self_done        dd ?
546
        dir_sf_parent_done      dd ?
548
        dir_sf_parent_done      dd ?
547
        entries_left_in_dir     dd ?
549
        entries_left_in_dir     dd ?
548
        entries_to_skip         dd ?
550
        entries_to_skip         dd ?
549
        max_dirblockaddr        dd ?
551
        max_dirblockaddr        dd ?
550
        cur_inode_save          dd ?
552
        cur_inode_save          dd ?
551
        shortform_inodelen      dd ?
553
        shortform_inodelen      dd ?
552
        bdfe_nameenc            dd ?
554
        bdfe_nameenc            dd ?
553
        bdfe_len                dd ?
555
        bdfe_len                dd ?
554
        bdfe_process            dd ?
556
        bdfe_process            dd ?
555
        inode_self              DQ ?
557
        inode_self              DQ ?
556
        bdfe_buf                dd ?
558
        bdfe_buf                dd ?
557
        eof                     dd ?
559
        eof                     dd ?
558
        offset_begin            DQ ?
560
        offset_begin            DQ ?
559
        offset_end              DQ ?
561
        offset_end              DQ ?
560
ends
562
ends
561
 
563
 
562
struct f70s0arg
564
struct f70s0arg
563
        sf       dd ?
565
        sf       dd ?
564
        offset   DQ ?
566
        offset   DQ ?
565
        count    dd ?
567
        count    dd ?
566
        buf      dd ?
568
        buf      dd ?
567
        zero     db ?
569
        zero     db ?
568
        path     dd ?
570
        path     dd ?
569
ends
571
ends
570
 
572
 
571
struct f70s1arg
573
struct f70s1arg
572
        sf        dd ?
574
        sf        dd ?
573
        start_idx dd ?
575
        start_idx dd ?
574
        encoding  dd ?
576
        encoding  dd ?
575
        count     dd ?
577
        count     dd ?
576
        buf       dd ?
578
        buf       dd ?
577
        zero      db ?
579
        zero      db ?
578
        path      dd ?
580
        path      dd ?
579
ends
581
ends
580
 
582
 
581
struct f70s5arg
583
struct f70s5arg
582
        sf     dd ?
584
        sf     dd ?
583
               dd ?
585
               dd ?
584
        xflags dd ?     ; name flags is already used
586
        xflags dd ?     ; name flags is already used
585
               dd ?
587
               dd ?
586
        buf    dd ?
588
        buf    dd ?
587
        zero   db ?
589
        zero   db ?
588
        path   dd ?
590
        path   dd ?
589
ends
591
ends
590
 
592
 
591
struct bdfe_hdr
593
struct bdfe_hdr
592
        version   dd ?
594
        version   dd ?
593
        read_cnt  dd ?
595
        read_cnt  dd ?
594
        total_cnt dd ?
596
        total_cnt dd ?
595
        zeroed    rd 5
597
        zeroed    rd 5
596
ends
598
ends
597
 
599
 
598
struct bdfe
600
struct bdfe
599
        attr     dd ?
601
        attr     dd ?
600
        nameenc  dd ?
602
        nameenc  dd ?
601
        ctime    dd ?
603
        ctime    dd ?
602
        cdate    dd ?
604
        cdate    dd ?
603
        atime    dd ?
605
        atime    dd ?
604
        adate    dd ?
606
        adate    dd ?
605
        mtime    dd ?
607
        mtime    dd ?
606
        mdate    dd ?
608
        mdate    dd ?
607
        size     DQ ?
609
        size     DQ ?
608
        name     db ?
610
        name     db ?
609
ends
611
ends