ceph_fname_to_usr(9)
π¦ ceph_fname_to_usr(9) π¦
Hey bestie! This is the Kernel API Manual page for ceph_fname_to_usr(9), and we're gonna get you comfy with it, fr fr. π
πΈ NAME πΈ
ceph_fname_to_usr β convert a filename for userland presentation β¨
π SYNOPSIS π
int ceph_fname_to_usr (const struct ceph_fname *fname , unsigned char
*tname , struct fscrypt_str *oname , bool *is_nokey );
π ARGUMENTS π
fnameβ theceph_fnamethat's getting converted, bestie.tnameβ temporary name buffer to use for conversion (it may beNULL, no cap).onameβ where the converted name should be placed.is_nokeyβ set totrueif the key wasn't available during conversion (may beNULL).
π§ DESCRIPTION π§
Okay so, given a filename (usually from the MDS), this function formats it for presentation to userland. π«
If parent is not encrypted, it just passes it back as-is. Easy.
Otherwise, it base64 decodes the string, and then asks fscrypt to format it for userland presentation. Slay. π
Now, the fscrypt/crypto subsystems broadly expect all buffers to be in the linear-mapped region, but this function slightly relaxes those requirements: fname->ctext, fname->name, and oname->name may be vmalloc, but not tname. That's the vibe check to remember. π
Returns 0 on success or a negative error code on error. Periodt.
π SEE ALSO π
Kernel file ./fs/ceph/crypto.c: ceph_fscrypt_prepare_readdir(9), ceph_fscrypt_decrypt_pages(9), ceph_fscrypt_decrypt_extents(9), ceph_fscrypt_encrypt_pages(9). Go read those next, iykyk. π
Source/version: ./fs/ceph β October 2026. Stay iconic, bestie! πβ¨
π¦ 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