ceph_fscrypt_encrypt_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 ⭐

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