virt_to_scatterlist(9)
π 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 toNULLand 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 π:
ecryptfs_from_hex(9)ecryptfs_derive_iv(9)ecryptfs_init_crypt_stat(9)ecryptfs_destroy_crypt_stat(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)ecryptfs_write_metadata(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)
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
- 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