STRUCT UBIFS_MST_NODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 within root_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 -1 value 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