xdr_write_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ xdr_write_pages β€” the kernel API manual, bestie edition ✨

okay so this is xdr_write_pages(9) from the Kernel API Manual, and it is literally the function that slides a whole pile of pages into your XDR buffer so they can go out on the wire. it's giving "packing my little bag for sending" energy πŸ’…


🌸 NAME 🌸

xdr_write_pages β€” Insert a list of pages into an XDR buffer for sending

like, that's the whole vibe. you have pages. you put them in the buffer. you send them. slay. πŸŽ€


✨ SYNOPSIS ✨

void xdr_write_pages (struct xdr_stream *xdr , struct page **pages ,
       unsigned int base , unsigned int len );

no return value, it's a void king, it just does the thing and moves on. main character behavior fr fr πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • xdr β€” pointer to xdr_stream. this is your stream bestie, the thing you're writing into.
  • pages β€” array of pages to insert. yes, the actual pages, plural, an array of them, we're being efficient today πŸ’–
  • base β€” starting offset of first data byte in pages. like where in the page does the tea actually start β˜•
  • len β€” number of data bytes in pages to insert. how much of it we're actually taking.

πŸ’œ DESCRIPTION πŸ’œ

so here's what goes down, no cap:

After the pages are added, the tail iovec is instantiated pointing to end of the head buffer β€” okay so picture it, the tail iovec gets born and it's pointing right at the end of the head buffer, iconic β€” and the stream is set up to encode subsequent items into the tail. so everything you encode after this just flows straight into the tail like it was always meant to be there. obsessed. 🌈


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, assembled. Kernel file ./net/sunrpc/xdr.c and:

that's thirty-nine (39) whole functions, a whole group chat. go read them, iykyk 🫢


aaaaand that's the page!! mwah πŸ’‹ this one lives in ./net/sunrpc and it's dated October 2026 β€” so yeah, mark your calendar bestie, see you then, stay hydrated and keep your XDR buffers tidy πŸ“πŸ§šπŸ’–

πŸ“¦ where this page comes from