Skip to content

Commit

Permalink
Update the volume superblock with latest fields
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
eafer committed Apr 23, 2024
1 parent 48f6df6 commit 2a10ca6
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions apfs_raw.h
Original file line number Diff line number Diff line change
Expand Up @@ -1241,15 +1241,24 @@ struct apfs_superblock {

__le64 apfs_snap_meta_ext_oid;

char apfs_volume_group_id[UUID_SIZE];
/*3F0*/ char apfs_volume_group_id[UUID_SIZE];

__le64 apfs_integrity_meta_oid;
/*400*/ __le64 apfs_integrity_meta_oid;

__le64 apfs_fext_tree_oid;
__le32 apfs_fext_tree_type;
/*410*/ __le32 apfs_fext_tree_type;

__le32 reserved_type;
__le64 reserved_oid;

/*420*/ __le64 apfs_doc_id_index_xid;
__le32 apfs_doc_id_index_flags;
__le32 apfs_doc_id_tree_type;
/*430*/ __le64 apfs_doc_id_tree_oid; /* Made-up name */
__le64 apfs_prev_doc_id_tree_oid;
__le64 apfs_doc_id_fixup_cursor;
__le64 apfs_sec_root_tree_oid;
/*450*/ __le32 apfs_sec_root_tree_type;
} __packed;

/* Extended attributes constants */
Expand Down

0 comments on commit 2a10ca6

Please sign in to comment.