dent_key_init(9)
π dent_key_init(9) β like, the UBIFS key girlies' origin story
okay so bestie, welcome to the Kernel API Manual, section 9 π this is dent_key_init, and she lives in the UBIFS corner of the kernel and she is literally the first step of every directory entry key. no cap.
β¨ NAME β¨
dent_key_init β initialize directory entry key. that's it. that's the whole job. she sets up a dirent key and she does it flawlessly π
πΈ SYNOPSIS πΈ
void dent_key_init (const struct ubifs_info *c , union ubifs_key *key ,
ino_t inum , const struct fscrypt_name *nm );
note the spacing, bestie β copied character for character, i don't play about that π«Ά
π¦ ARGUMENTS π¦
cβ the UBIFS file-system description object. literally the whole vibe of the filesystem in one struct πkeyβ the key you're initializing. this is the main character, she's getting set up right here β¨inumβ the parent inode number. yes, parent. not the direntry's own inode. don't get it twisted πnmβ the direntry name and length. warning tho: not a string when encrypted! π like, do not go printing that thing with%s, i'm begging you. it's giving raw encrypted bytes, not a cute little char array π
fr fr, that last one is the trap. encrypted names are not C strings. treat them as name + length and nothing else π©
π₯ SEE ALSO π₯
okay this is the part where she tags the whole group chat in. every single one, no skipping:
Kernel file ./fs/ubifs/key.h β key_mask_hash(9), key_r5_hash(9), key_test_hash(9), ino_key_init(9), ino_key_init_flash(9), lowest_ino_key(9), highest_ino_key(9), dent_key_init_hash(9), dent_key_init_flash(9), lowest_dent_key(9), xent_key_init(9), xent_key_init_flash(9), lowest_xent_key(9), data_key_init(9), highest_data_key(9), trun_key_init(9), invalid_key_init(9), key_type(9), key_type_flash(9), key_inum(9), key_inum_flash(9), key_hash(9), key_hash_flash(9), key_block(9), key_block_flash(9), key_read(9), key_write(9), key_write_idx(9), key_copy(9), keys_cmp(9), keys_eq(9), is_hash_key(9), key_max_inode_size(9)
like, that's the entire key.h ensemble cast and she knows every one of them π go read them, they ate π
π and that's the page, bestie π sourced from ./fs/ubifs, dated October 2026, and filed under dent_key_init(9) in the Kernel API Manual. mwah, go initialize some dirent keys responsibly πβ¨π
π¦ 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