virt_to_scatterlist(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… virt_to_scatterlist β€” Kernel API Manual ✨

okay so bestie, you opened the Kernel API Manual and landed on virt_to_scatterlist(9), and honestly? This one's a little cutie. Let's get into it 🫢


πŸŽ€ NAME πŸŽ€

virt_to_scatterlist β€”

(yeah the original's NAME line is literally just vibing there with nothing after the dash. no cap, that's the whole thing. the real tea is all in DESCRIPTION, keep reading πŸ‘‘)


✨ SYNOPSIS ✨

int virt_to_scatterlist (const void *addr , int size , struct scatterlist *sg , int sg_size );

🌸 ARGUMENTS 🌸

  • addr β€” the virtual address. like, the actual address-address πŸ’–
  • size β€” how much data we're talking about; it should be an even multiple of the block size. not optional-energy, this is a should, so pls respect it πŸ™ˆ
  • sg β€” pointer to the scatterlist array. plot twist: set it to NULL and you get only the number of scatterlist structs you'd need in the array. it's giving "just tell me the size, i'm not ready to commit" πŸ’€
  • sg_size β€” max array size. the ceiling, the limit, the boundary-setting queen πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does it do? It fills in a scatterlist array with page references for a virtual address you pass in. That's it, that's the whole serve ✨

And the return value? It hands you back the number of scatterlist structs in the array used β€” that's your receipt, bestie 🧾


🌈 SEE ALSO 🌈

Kernel file ./fs/ecryptfs/crypto.c β€” and like, the entire ecryptfs friend group, we love a connected cast πŸ’œ:


periodt. go fill that scatterlist array, icon πŸ’…

source spot: ./fs/ecryptfs Β· dated October 2026 Β· mwah, that's the page, hope it ate πŸŽ€β­

πŸ“¦ where this page comes from