STRUCT UBIFS_ZNODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct ubifs_znode(9) πŸ’–

okay bestie, so this is a page from the Kernel API Manual, and today's main character is struct ubifs_znode β€” the in-memory representation of an indexing node. no cap, that's literally what it is. and the kernel file it lives in is ./fs/ubifs/ubifs.h, in case you were wondering where to find it. πŸ‘‘


✨ SYNOPSIS ✨

here's the whole glow-up, in code, exactly as it is:

struct ubifs_znode {
    struct ubifs_znode *parent;
    struct ubifs_znode *cnext;
    struct ubifs_znode *cparent;
    int ciip;
    unsigned long flags;
    time64_t time;
    int level;
    int child_cnt;
    int iip;
    int alt;
    int lnum;
    int offs;
    int len;
    struct ubifs_zbranch zbranch[];
};

πŸŽ€ Members πŸŽ€

ok so each of these fields has lore, let's get into it:

  • parent β€” the parent znode, or NULL if this girly is the root. main character energy, honestly.
  • cnext β€” the next znode to commit.
  • cparent β€” the parent node for this commit.
  • ciip β€” the index in cparent's zbranch array.
  • flags β€” the znode flags (DIRTY_ZNODE, COW_ZNODE or OBSOLETE_ZNODE). pick your fighter πŸ’…
  • time β€” last access time, in seconds.
  • level β€” the level of the entry in the TNC tree.
  • child_cnt β€” how many child znodes there are.
  • iip β€” the index in the parent's zbranch array.
  • alt β€” lower bound of the key range has altered, i.e. a child got inserted at slot 0.
  • lnum β€” LEB number of the corresponding indexing node.
  • offs β€” offset of the corresponding indexing node.
  • len β€” length of the corresponding indexing node.
  • zbranch β€” array of znode branches (c->fanout elements).

🌸 Description 🌸

⚠️ Note! the lnum, offs, and len fields are not really needed β€” we have them only for internal consistency check. they could be removed to save some RAM. so like... they're just vibing there for safety. ngl, relatable. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/ubifs/ubifs.h, plus the whole friend group:

  • struct ubifs_old_idx(9)
  • struct ubifs_scan_node(9)
  • struct ubifs_scan_leb(9)
  • struct ubifs_gced_idx_leb(9)
  • struct ubifs_inode(9)
  • struct ubifs_unclean_leb(9)
  • struct ubifs_lprops(9)
  • struct ubifs_lpt_lprops(9)
  • struct ubifs_lp_stats(9)
  • struct ubifs_cnode(9)
  • struct ubifs_pnode(9)
  • struct ubifs_nbranch(9)
  • struct ubifs_nnode(9)
  • struct ubifs_lpt_heap(9)
  • struct ubifs_wbuf(9)
  • struct ubifs_bud(9)
  • struct ubifs_jhead(9)
  • struct ubifs_zbranch(9)
  • struct bu_info(9)
  • struct ubifs_node_range(9)
  • struct ubifs_compressor(9)
  • struct ubifs_budget_req(9)
  • struct ubifs_orphan(9)
  • struct ubifs_mount_opts(9)
  • struct ubifs_budg_info(9)
  • struct ubifs_stats_info(9)
  • struct ubifs_info(9)
  • ubifs_check_hash(9)
  • ubifs_check_hmac(9)
  • ubifs_branch_hash(9)
  • ubifs_copy_hash(9)
  • ubifs_auth_node_sz(9)

and that's the whole page, bestie, you ate that 🫢 this little drop came from ./fs/ubifs and it's dated October 2026 β€” iconic, periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from