ecryptfs_write_metadata(9)
π ecryptfs_write_metadata β¨
okay bestie, welcome to the Kernel API Manual, section 9 β this one's a kernel-space girlie, no shell commands in sight, but she's still iconic, iykyk π
πΈ NAME πΈ
ecryptfs_write_metadata β
and yes, the description field is literally empty in the original, no cap. That's not me being lazy, that's just... the vibe. π The name is the whole personality here.
π¦ SYNOPSIS π¦
int ecryptfs_write_metadata (struct dentry *ecryptfs_dentry , struct
inode *ecryptfs_inode );
she takes two pointers and hands you back an int, periodt π₯
π ARGUMENTS π
ecryptfs_dentryβ the eCryptfs dentry, and heads up: it should be negative. Yes bestie, negative dentry is a real thing, it's not a sad dentry, it's a technical one π«Άecryptfs_inodeβ the freshly-created eCryptfs inode, brand new, main character energy β¨
π DESCRIPTION π
so what does she actually do? she writes the file headers out. that's the whole assignment π
but here's the tea: this will likely involve a userspace callout π β meaning the session key gets encrypted with one or more public keys, and/or the passphrase you need to do the encryption gets retrieved via a prompt. like, a real live prompt. the kernel is knocking on userspace's door and asking politely.
and the exact details of what happens at this point? should be policy-dependent. so don't @ me for specifics, it's a policy girlie π
Returns zero on success; non-zero on error β classic, clean, no notes π
π SEE ALSO π
okay this list is long and honestly kind of iconic, all of these live in the kernel file ./fs/ecryptfs/crypto.c, and every single one of them is a section (9) bestie:
ecryptfs_from_hex(9)ecryptfs_derive_iv(9)ecryptfs_init_crypt_stat(9)ecryptfs_destroy_crypt_stat(9)virt_to_scatterlist(9)crypt_scatterlist(9)crypt_extent(9)ecryptfs_encrypt_page(9)ecryptfs_decrypt_page(9)ecryptfs_init_crypt_ctx(9)ecryptfs_copy_mount_wide_flags_to_inode_flags(9)ecryptfs_set_default_crypt_stat_vals(9)ecryptfs_new_file_context(9)ecryptfs_validate_marker(9)ecryptfs_process_flags(9)write_ecryptfs_marker(9)ecryptfs_code_for_cipher_string(9)ecryptfs_cipher_code_to_string(9)ecryptfs_write_headers_virt(9)set_default_header_data(9)ecryptfs_read_headers_virt(9)ecryptfs_read_xattr_region(9)ecryptfs_process_key_cipher(9)ecryptfs_destroy_crypto(9)ecryptfs_tfm_exists(9)ecryptfs_get_tfm_and_mutex_for_cipher_name(9)ecryptfs_encode_for_filename(9)ecryptfs_decode_from_filename(9)ecryptfs_encrypt_and_encode_filename(9)ecryptfs_decode_and_decrypt_filename(9)
go read them all, bestie, that's your homework ππ
heads up π«Ά β the whole "userspace callout / prompt for passphrase" thing means this isn't some quiet little in-kernel bookkeeping moment. keep that in mind, fr fr.
okay that's the page!! mwah π this one came from the kernel file ./fs/ecryptfs, dated October 2026, and she's filed as ecryptfs_write_metadata(9) β slay, go write some headers πΈπ§ββοΈπ
π¦ 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