iov_iter_folio_queue(9)
π iov_iter_folio_queue(9) β the Kernel API Manual glow-up π
okay bestie, so this one lives in the Kernel API Manual, and it's literally the function that sets up an I/O iterator to vibe with the folios in a folio queue. no cap, it's giving "plumbing but make it cute" π«Ά
β¨ NAME β¨
iov_iter_folio_queue β Initialise an I/O iterator to use the folios in a folio queue
likeβ¦ that's the whole job. it initialises. it iterates. it folio-queues. iconic behaviour honestly π
πΈ SYNOPSIS πΈ
void iov_iter_folio_queue (struct iov_iter *i , unsigned int direction ,
const struct folio_queue *folioq , unsigned int first_slot , unsigned
int offset , size_t count );
she takes six arguments and returns void, because she's a doer, not a reporter π
π ARGUMENTS π
iβ The iterator to initialise. that's your main character right there, bestie, she's getting set up β¨directionβ The direction of the transfer. which way are we going? that way. πfolioqβ The starting point in the folio queue. your entry point, your launchpad, your moment πfirst_slotβ The first slot in the folio queue to use. not the second slot. not the third. the first one π₯offsetβ The offset into the folio in the first slot to start at. we're not starting at zero, we're starting precisely where we're told, and honestly? respect π«‘countβ The size of the I/O buffer in bytes. how much I/O is in this I/O buffer, measured in bytes, as one does π
π¦ DESCRIPTION π¦
so here's the tea β β this sets up an I/O iterator to either draw data out of the pages attached to an inode or to inject data into those pages. two directions, one iterator, endless possibilities, we love a versatile queen π
β οΈ the important part, do not skip this, I'm serious β οΈ The pages *must* be prevented from evaporation, either by taking a ref on them or locking them by the caller. "must" with asterisks around it, bestie. the manpage is yelling. do not let those pages evaporate, or it's going to be a whole situation π π
π SEE ALSO π
- Kernel file
./lib/iov_iter.c _copy_mc_to_iter(9)_copy_from_iter_flushcache(9)iov_iter_xarray(9)iov_iter_discard(9)import_iovec(9)iov_iter_restore(9)iov_iter_extract_pages(9)iov_iter_extract_bvecs(9)
go read the whole friend group, they're all slaying in their own lanes π
and that's the page!! brought to you by the fine folks over at ./lib, dated October 2026 β mark your calendars bestie, mwah π π bye!!
π¦ 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