STRUCT UBIFS_DENT_NODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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