fscrypt_match_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fscrypt_match_name(9) β€” the Kernel API Manual page you didn't know you needed

okay so bestie, welcome to fscrypt_match_name(9) from the Kernel API Manual β€” yes that's the manual name, we're not copying the whole header line, we're living it. this one's a little boolean baddie that answers the most dramatic question in all of fscrypt: does this name match this directory entry or not πŸŽ€


✨ SYNOPSIS ✨

bool fscrypt_match_name (const struct fscrypt_name *fname , const u8
*de_name , u32 de_name_len );

like, it returns a bool, it takes three things, it's giving "small function, big responsibility" energy. periodt. πŸ¦‹


🌸 ARGUMENTS 🌸

  • fname β€” the name we're out here searching for, our main character honestly πŸ‘‘
  • de_name β€” the name straight out of the directory entry, the one we're checking against
  • de_name_len β€” how long de_name is, in bytes. bytes bestie, not vibes 🌈

πŸ’– DESCRIPTION πŸ’–

okay so normally, fname->disk_name will be set, and when it is? we literally just compare that to the name stored in the directory entry. simple. clean. no notes. ✨

the one exception (and it's kind of a big one, ngl) is this: if we don't have the key for an encrypted directory and the name we're looking for is very long, then we won't have the full disk_name 😭 β€” so instead we'll need to match against a fscrypt_nokey_name that includes a strong hash. no key, extra long name, hash-matching era. iykyk 🧚

it's giving "we can't read the whole thing so we're comparing fingerprints instead" and honestly? iconic.

⭐ RETURN ⭐

true if the name matches, otherwise false. that's it, that's the whole vibe check. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/crypto/fname.c plus the whole friend group:


and that's the page bestie 🫢 this came from the ./fs/crypto source, dated October 2026, and it's fscrypt_match_name(9) officially signing off β€” go compare some names, slay, and remember: long encrypted name with no key means hash matching, not a breakdown πŸ’€βœ¨

πŸ“¦ where this page comes from