iov_iter_discard(9)
β¨ iov_iter_discard(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a lil function that literally sets up "the void" as an I/O destination β no cap, it's iconic for reasons we're about to get into π«Ά
πΈ NAME πΈ
iov_iter_discard β initialise an I/O iterator that discards data π
π¦ SYNOPSIS π¦
void iov_iter_discard (struct iov_iter *i , unsigned int direction ,
size_t count );
π ARGUMENTS π
iβ the iterator you're gonna initialise, bestie. that's the whole vibe. π―directionβ which way the transfer is going. yeah. the direction. (iykyk π)countβ the size of the I/O buffer, in bytes. every single byte counted, fr fr π’
π DESCRIPTION π
so here's the tea β β you're setting up an I/O iterator that just discards everything written to it. it's giving "black hole but make it an iterator" π³οΈβ¨ everything goes in, nothing comes out, the data is gone, slay.
π heads up bestie: it's only available as a READ iterator. that's the rule and we respect it, periodt.
π SEE ALSO π
Kernel file ./lib/iov_iter.c β and also these iconic siblings:
_copy_mc_to_iter(9)_copy_from_iter_flushcache(9)iov_iter_folio_queue(9)iov_iter_xarray(9)import_iovec(9)iov_iter_restore(9)iov_iter_extract_pages(9)iov_iter_extract_bvecs(9)
okay that's the whole thing, bestie π short and sweet and fully discard-coded. you got this π
source: ./lib Β· version/date: October 2026 Β· iov_iter_discard(9) β mwah, go read iov_iter.c, ily ππ§ββοΈ
π¦ 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