ceph_fscrypt_encrypt_pages(9)
π ceph_fscrypt_encrypt_pages(9) β from the Kernel API Manual, bestie
okay so picture this: it's a kernel API manual page, it's called ceph_fscrypt_encrypt_pages, and it's literally about locking down an array of pages so nobody can snoop. we're in section 9 (kernel interfaces, iykyk). let's get into it π«Ά
β¨ NAME β¨
ceph_fscrypt_encrypt_pages β encrypt an array of pages. that's the whole vibe. π
πΈ SYNOPSIS πΈ
int ceph_fscrypt_encrypt_pages (struct inode *inode , struct page **page
, u64 off , int len );
π¦ ARGUMENTS π¦
inodeβ pointer to the inode associated with these pages. it's giving "which file are we even talking about" energy π«pageβ pointer to the page array. the actual pages, plural, an ensemble cast πoffβ offset into the file that the data starts. where the tea begins βlenβ max length to encrypt. the upper limit, the ceiling, the cap fr fr π§’
π DESCRIPTION π
okay so what it does: it encrypts an array of cleartext pages and returns the amount of data encrypted. iconic behaviour, no notes.
two little rules you need to know, and please don't skip them:
- any data in the page prior to the start of the first complete block in the read is ignored. like, not invited to the party π
- any incomplete crypto blocks at the end of the array are ignored too. partial blocks don't get to slay today π
returns the length of the encrypted data, or a negative errno. so if it comes back negative, that's your sign something went sideways π
ngl, "ignored" is doing a lot of work in this paragraph β it's not a suggestion, it's the actual documented behaviour. remember it.
β SEE ALSO β
- Kernel file
./fs/ceph/crypto.cβ the source, the mothership π§ ceph_fname_to_usr(9)ceph_fscrypt_prepare_readdir(9)ceph_fscrypt_decrypt_pages(9)ceph_fscrypt_decrypt_extents(9)
all the cousins of this function, go read them too, they're also iconic π
and that's the whole page, bestie π this one lives in ./fs/ceph and is dated October 2026, filed under ceph_fscrypt_encrypt_pages(9) β go forth and encrypt responsibly, mwah ππ₯
π¦ 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