Skip to content

Commit 2a10ca6

Browse files
committed
Update the volume superblock with latest fields
If the latest newfs_apfs creates an image with the default options, older versions of fsck_apfs complain about an unknown volume superblock field called "apfs_doc_id_index_flags". Several such new fields appear to have been added, and after some bit flipping I managed to retrieve the names for all of them, except for "apfs_doc_id_tree_oid" which is only a (probably correct) guess. I have no plans for these fields right now, but document them all in apfs_raw.h anyway, so that I don't forget. Signed-off-by: Ernesto A. Fernández <[email protected]>
1 parent 48f6df6 commit 2a10ca6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

apfs_raw.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,15 +1241,24 @@ struct apfs_superblock {
12411241

12421242
__le64 apfs_snap_meta_ext_oid;
12431243

1244-
char apfs_volume_group_id[UUID_SIZE];
1244+
/*3F0*/ char apfs_volume_group_id[UUID_SIZE];
12451245

1246-
__le64 apfs_integrity_meta_oid;
1246+
/*400*/ __le64 apfs_integrity_meta_oid;
12471247

12481248
__le64 apfs_fext_tree_oid;
1249-
__le32 apfs_fext_tree_type;
1249+
/*410*/ __le32 apfs_fext_tree_type;
12501250

12511251
__le32 reserved_type;
12521252
__le64 reserved_oid;
1253+
1254+
/*420*/ __le64 apfs_doc_id_index_xid;
1255+
__le32 apfs_doc_id_index_flags;
1256+
__le32 apfs_doc_id_tree_type;
1257+
/*430*/ __le64 apfs_doc_id_tree_oid; /* Made-up name */
1258+
__le64 apfs_prev_doc_id_tree_oid;
1259+
__le64 apfs_doc_id_fixup_cursor;
1260+
__le64 apfs_sec_root_tree_oid;
1261+
/*450*/ __le32 apfs_sec_root_tree_type;
12531262
} __packed;
12541263

12551264
/* Extended attributes constants */

0 commit comments

Comments
 (0)