iov_iter_discard(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


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