key_mask_hash(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– key_mask_hash(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for key_mask_hash(9). It’s a tiny function with main character energy: it keeps the reserved hash values out of your directory offsets. ✨


πŸŽ€ NAME πŸŽ€

key_mask_hash β€” mask a valid hash value. πŸ’…

✨ SYNOPSIS ✨

uint32_t key_mask_hash (uint32_t hash );

🫢 ARGUMENTS 🫢

  • hash β€” the value to be masked. πŸŽ€

πŸ’… DESCRIPTION πŸ’…

So here’s the situation, bestie: we use hash values as offsets in directories, which means values 0 and 1 are reserved for "." and "..". The value 2 is reserved for the "end of readdir" marker. 😭

This function makes sure those reserved values are not used. Periodt. πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./fs/ubifs/key.h β€” the whole friend group:

β€” source/version ./fs/ubifs, dated October 2026; that’s the whole page, bestie. πŸ’…πŸ«Ά

πŸ“¦ where this page comes from