xdr_shrink_pagelen(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ xdr_shrink_pagelen(9) ✨

okay so bestie, we're in the Kernel API Manual today and the star of the show is xdr_shrink_pagelen β€” it's giving kernel-internals main character energy, and honestly? obsessed πŸ’…


🌸 NAME 🌸

xdr_shrink_pagelen β€” shrinks buf->pages to @len bytes πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int xdr_shrink_pagelen (struct xdr_buf *buf , unsigned int len
);

πŸ’– ARGUMENTS πŸ’–

  • buf β€” an xdr_buf, that's the vibe 🫢
  • len β€” the new page buffer length, like the new size bestie, that's the whole point ✨

πŸ”₯ DESCRIPTION πŸ”₯

The way this function just... trims buf->pages down to len bytes, no cap. πŸŽ€

And listen β€” the extra data does not just get yeeted into the void 😭 it's not lost at all, bestie. Instead it gets moved into buf->tail. Iconic relocation behaviour honestly.

It returns the actual number of bytes moved. So like, that's your receipt. πŸ’…


πŸ’€ SEE ALSO πŸ’€

Kernel file ./net/sunrpc/xdr.c β€” and the whole extended friend group, fr fr:


and that's the whole page, bestie πŸ§šπŸ’œ this one came out of ./net/sunrpc, dated October 2026, and it's literally dedicated to you and your page-shrinking journey πŸ“βœ¨ slay πŸŽ€

πŸ“¦ where this page comes from