STRUCT UBIFS_ORPHAN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct ubifs_orphan(9) πŸŽ€

okay so bestie, welcome to the Kernel API Manual πŸ’– this little cutie lives in the kernel and honestly? it's giving "small but crucial." let's get into it ✨


🌸 NAME 🌸

struct ubifs_orphan β€” stores the inode number of an orphan. yeah. that's literally her whole job. no cap. πŸ’…


✨ SYNOPSIS ✨

struct ubifs_orphan {
    struct rb_node rb;
    struct list_head list;
    struct list_head new_list;
    struct ubifs_orphan *cnext;
    struct ubifs_orphan *dnext;
    ino_t inum;
    unsigned new:1;
    unsigned cmt:1;
    unsigned del:1;
 };

like, look at her. she's so structured 🫢 (pun intended, i had to 😭)


πŸ¦‹ Members πŸ¦‹

okay so let's meet the whole squad, one by one πŸ‘‘

  • rb β€” the rb-tree node of the rb-tree of orphans, sorted by inode number. she's literally in a whole sorted tree, main character energy πŸ”₯
  • list β€” the list head of the list of orphans in order added. first come, first served bestie ✨
  • new_list β€” the list head of the list of orphans added since the last commit. the "new arrivals" crew πŸŽ€
  • cnext β€” the next orphan to commit. she's next in line, periodt πŸ’…
  • dnext β€” the next orphan to delete. yeah... she's on the way out 😭
  • inum β€” the inode number. her whole identity tbh πŸͺͺ
  • new β€” 1 => added since the last commit, otherwise 0. so if it's 1, she's fresh out the box 🌸
  • cmt β€” 1 => commit pending, otherwise 0. pending bestie, we're waiting 🫠
  • del β€” 1 => delete pending, otherwise 0. πŸ’€ rip i guess
ngl these three bitfields being 1/0 flags is so lowkey elegant, i'm obsessed 🧚

πŸ’œ SEE ALSO πŸ’œ

so like, the whole extended friend group πŸ₯° kernel file ./fs/ubifs/ubifs.h and literally all of these:

  • 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 ubifs_znode(9)
  • struct bu_info(9)
  • struct ubifs_node_range(9)
  • struct ubifs_compressor(9)
  • struct ubifs_budget_req(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 babes πŸ’– this one's from ./fs/ubifs, dated October 2026, and we are so grateful she exists. go read the source, slay, and drink some water πŸ“πŸ§šβ€β™€οΈ bye bestie!! πŸ‘‘

πŸ“¦ where this page comes from