STRUCT UBIFS_ORPHAN(9)
π 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, otherwise0. so if it's1, she's fresh out the box πΈcmtβ1=> commit pending, otherwise0. pending bestie, we're waiting π«delβ1=> delete pending, otherwise0. π rip i guess
ngl these three bitfields being1/0flags 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
- 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