STRUCT UBIFS_ZBRANCH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, welcome to the Kernel API Manual β€” yes, we're doing kernel API now, we contain multitudes 🧚✨. This page is all about struct ubifs_zbranch, which is literally a key/coordinate/length branch stored in znodes. That's the whole vibe. It's giving "small struct, big responsibilities" πŸ‘‘


✨ SYNOPSIS ✨

ok so here's the actual shape of it, and yes, it's an anonymous union, we love a mystery πŸŽ€:

struct ubifs_zbranch {
    union ubifs_key key;
    union {
      struct ubifs_znode *znode;
      void *leaf;
    };
    int lnum;
    int offs;
    int len;
    u8 hash[UBIFS_HASH_ARR_SZ];
 };

🌸 Members 🌸

bestie, let's go through the members one by one, no skipping, we don't do that here 🫢

  • key β€” the key. that's it. that's the field πŸ’…
  • {unnamed_union} β€” anonymous. spooky. mysterious. no name, all vibes πŸ™ˆ
  • znode β€” the znode address in memory πŸ“
  • leaf β€” the leaf node πŸ“
  • lnum β€” the LEB number of the target node (and heads up, that target node can be an indexing node or a data node β€” both valid, both iconic) πŸ”₯
  • offs β€” the target node's offset within lnum 🎯
  • len β€” the target node length πŸ“
  • hash β€” the hash of the target node πŸ”

πŸ¦‹ SEE ALSO πŸ¦‹

no cap, this is a long list, so buckle up β€” all of these live in the kernel file ./fs/ubifs/ubifs.h:

  • 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_znode(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)

fr fr, go read those if you wanna actually understand the indexing situation. iykyk πŸ’€

okay that's the whole page bestie, you ate that 🫢✨ this one came from ./fs/ubifs and it's dated October 2026, and the footer says struct ubifs_zbranch(9) β€” main character energy from start to finish πŸ‘‘πŸ’– periodt.

πŸ“¦ where this page comes from