STRUCT UBIFS_DENT_NODE(9)
π struct ubifs_dent_node(9)
okay so this is a page from the Kernel API Manual and honestly bestie, it's giving "one struct, all the drama." Sit down, grab a lil snack π β we're learning about struct ubifs_dent_node, the directory entry node. yes, that one. periodt.
β¨ NAME β¨
struct ubifs_dent_node β directory entry node. that's it, that's the vibe π
π¦ SYNOPSIS π¦
here's the whole thing, copy it exactly, don't @ me:
struct ubifs_dent_node {
struct ubifs_ch ch;
__u8 key[UBIFS_MAX_KEY_LEN];
__le64 inum;
__u8 padding1;
__u8 type;
__le16 nlen;
__le32 cookie;
__u8 name[];
};
π Members π
okay each of these is a lil icon in its own right, let's go through them one by one:
chβ the common header. every node's got one, it's literally the main character energy of the struct π«keyβ the node key. this is the<italic>lookup</italic>of it all, iykyk πinumβ target inode number. pointing at what it's pointing at, no cap.padding1β reserved for future, zeroes. it's just sitting there looking cute, holding space πΈtypeβ type of the target inode (UBIFS_ITYPE_REG,UBIFS_ITYPE_DIR, etc). so it knows what kinda thing it's dealing with πnlenβ name length. short king behavior ngl.cookieβ A 32bits random number, used to construct a 64bits identifier. randomness slay πͺnameβ zero-terminated name. the name!! the star of the show!! β
π Description π
Note, do not forget to amend 'zero_dent_node_unused' function when changing the padding fields.
fr fr, this is the one warning on the whole page β if you go changing those padding fields, you gotta go fix 'zero_dent_node_unused' too. not me forgetting that and having a whole crisis π. just... don't.
π SEE ALSO π
the whole friend group π«Ά, and yeah, there's a lot of them:
- Kernel file
./fs/ubifs/ubifs-media.hβ the source file, go say hi struct ubifs_ch(9)union ubifs_dev_desc(9)struct ubifs_ino_node(9)struct ubifs_data_node(9)struct ubifs_trun_node(9)struct ubifs_pad_node(9)struct ubifs_sb_node(9)struct ubifs_mst_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)
β¨ and that's the whole page bestie β¨ β brought to you by the fine folks at ./fs/ubifs, dated October 2026, and yes the title is still struct ubifs_dent_node(9) because we don't rename icons around here ππ¦
π¦ 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