STRUCT UBIFS_MST_NODE(9)
π struct ubifs_mst_node(9) β the Kernel API Manual, but make it make sense
okay so bestie, welcome to the struct ubifs_mst_node(9) page, from the Kernel API Manual. this is the master node. the main character of the UBIFS flash filesystem, honestly. let's get into it π«Ά
β¨ NAME β¨
struct ubifs_mst_node β master node. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
bestie, look at this struct. it's giving "final boss of a flash filesystem" and i'm obsessed:
struct ubifs_mst_node {
struct ubifs_ch ch;
__le64 highest_inum;
__le64 cmt_no;
__le32 flags;
__le32 log_lnum;
__le32 root_lnum;
__le32 root_offs;
__le32 root_len;
__le32 gc_lnum;
__le32 ihead_lnum;
__le32 ihead_offs;
__le64 index_size;
__le64 total_free;
__le64 total_dirty;
__le64 total_used;
__le64 total_dead;
__le64 total_dark;
__le32 lpt_lnum;
__le32 lpt_offs;
__le32 nhead_lnum;
__le32 nhead_offs;
__le32 ltab_lnum;
__le32 ltab_offs;
__le32 lsave_lnum;
__le32 lsave_offs;
__le32 lscan_lnum;
__le32 empty_lebs;
__le32 idx_lebs;
__le32 leb_cnt;
__u8 hash_root_idx[UBIFS_MAX_HASH_LEN];
__u8 hash_lpt[UBIFS_MAX_HASH_LEN];
__u8 hmac[UBIFS_MAX_HMAC_LEN];
__u8 padding[152];
};
π¦ Members π¦
every single field has a job and every single one is doing it. no filler, no flops. π
chβ the common header. the little intro every node gets before the real content, iykyk.highest_inumβ highest inode number in the committed index. the ceiling of your inode numbering, periodt.cmt_noβ commit number. the count of how many commits we've done, tracked like a receipts folder. π§Ύflagsβ various flags (UBIFS_MST_DIRTY, etc). little boolean moods the node can be in.log_lnumβ start of the log. where the log section begins, literally.root_lnumβ LEB number of the root indexing node. so like, the address of the root of the index tree.root_offsβ offset withinroot_lnum. fine-tuning where exactly inside that LEB.root_lenβ root indexing node length. how big the thing is.gc_lnumβ LEB reserved for garbage collection. heads up bestie: a-1value means the LEB was not reserved and should be reserved on mount. don't sleep on that detail. ποΈihead_lnumβ LEB number of index head. where the index head lives.ihead_offsβ offset of index head. exactly where in that LEB it's sitting.index_sizeβ size of index on flash. how much flash real estate the index is eating.total_freeβ total free space in bytes. the space you can still use, slay. πtotal_dirtyβ total dirty space in bytes. space that needs cleaning up eventually.total_usedβ total used space in bytes. note: includes only data LEBs. πtotal_deadβ total dead space in bytes. note: includes only data LEBs. also kind of a mood, ngl.total_darkβ total dark space in bytes. note: includes only data LEBs. dark space sounds ominous and honestly it kind of is.lpt_lnumβ LEB number of LPT root nnode. (yes, "nnode", that's literally what it says, keep it moving π)lpt_offsβ offset of LPT root nnode. the exact spot inside it.nhead_lnumβ LEB number of LPT head. where the LPT head lives.nhead_offsβ offset of LPT head. precision location unlocked.ltab_lnumβ LEB number of LPT's own lprops table. the LPT has its own table, main character behavior fr fr.ltab_offsβ offset of LPT's own lprops table. where in that LEB it starts.lsave_lnumβ LEB number of LPT's save table (big model only). π¨ big model only, don't forget.lsave_offsβ offset of LPT's save table (big model only). same caveat, same energy.lscan_lnumβ LEB number of last LPT scan. the last place we scanned, for the record.empty_lebsβ number of empty logical eraseblocks. fresh, untouched, pristine. β¨idx_lebsβ number of indexing logical eraseblocks. how many LEBs the index is claiming.leb_cntβ count of LEBs used by the file-system. the whole flex, in LEBs.hash_root_idxβ the hash of the root index node. integrity check core. π₯hash_lptβ the hash of the LPT. same energy, different table.hmacβ HMAC to authenticate the master node. security said what she said. π‘οΈpaddingβ reserved for future, zeroes. it's just sitting there being zero, iconic.
π SEE ALSO π
bestie if you liked this one, the whole friend group is right here in the Kernel file ./fs/ubifs/ubifs-media.h:
struct ubifs_ch(9)union ubifs_dev_desc(9)struct ubifs_ino_node(9)struct ubifs_dent_node(9)struct ubifs_data_node(9)struct ubifs_trun_node(9)struct ubifs_pad_node(9)struct ubifs_sb_node(9)struct ubifs_ref_node(9)struct ubifs_auth_node(9)struct ubifs_sig_node(9)struct ubifs_branch(9)struct ubifs_idx_node(9)struct ubifs_cs_node(9)struct ubifs_orph_node(9)
pro tip from me to you: every field here is load-bearing. this is the master node. treat her with respect. π
and that's a wrap, bestie! π¦π this lil page came from ./fs/ubifs, dated October 2026, and it's the struct ubifs_mst_node(9) manual page. go read the source, stan the kernel, and hydrate. mwah! π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms