__xdr_commit_encode(9)
π __xdr_commit_encode(9) β like, the Kernel API Manual page you didn't know you needed π
okay bestie, so this is a page straight out of the Kernel API Manual (yes, that's the manual name, it's giving official π ) and it's all about one tiny little function that does one very specific, very important job. It's not glamorous, but honestly? It's a supporting character with main character energy. Let's get into it. β¨
β¨ SYNOPSIS β¨
void __xdr_commit_encode (struct xdr_stream *xdr );
like, that's the whole signature. no cap, that's it. π«Ά
πΈ ARGUMENTS πΈ
xdrβ a pointer toxdr_stream. that's your whole argument list, bestie, one (1) pointer, that's the vibe. π¦
π DESCRIPTION π
okay so here's the situation. When you're encoding stuff across page boundaries, the kernel doesn't just let you scribble wherever β instead it hands the caller a temporary location to write to, and then later copies all that data into its proper place. xdr_commit_encode is the function that does that copying. that's literally its whole job. it's the cleanup crew. the stage crew after the show. π
Normally, you don't need to call this directly, because the following xdr_reserve_space will do it for you β it's got your back like that. π«Ά But an explicit call may be required at the end of encoding, or any other time when the xdr_buf data might be read. so like, if you're about to peek at the data, commit first. iykyk. π
lowkey important: this is one of those "you probably don't need it, but when you need it, you NEED it" functions. no inventing behaviour, that's just what the page says, fr fr. π
β SEE ALSO β
this list is long, bestie, and not me about to list every single one of them, because they ALL matter. π
- Kernel file
./net/sunrpc/xdr.c xdr_encode_opaque_fixed(9)xdr_encode_opaque(9)xdr_terminate_string(9)xdr_buf_to_bvec(9)xdr_buf_to_sg(9)xdr_buf_to_sg_alloc(9)xdr_inline_pages(9)_shift_data_left_pages(9)_shift_data_right_pages(9)_copy_to_pages(9)_copy_from_pages(9)xdr_buf_pages_zero(9)xdr_shrink_bufhead(9)xdr_shrink_pagelen(9)xdr_stream_pos(9)xdr_page_pos(9)xdr_init_encode(9)xdr_init_encode_pages(9)xdr_reserve_space(9)xdr_reserve_space_vec(9)xdr_truncate_encode(9)xdr_truncate_decode(9)xdr_restrict_buflen(9)xdr_write_pages(9)xdr_init_decode(9)xdr_init_decode_pages(9)xdr_finish_decode(9)xdr_inline_decode(9)xdr_read_pages(9)xdr_set_pagelen(9)xdr_enter_page(9)xdr_buf_subsegment(9)xdr_stream_subsegment(9)xdr_stream_move_subsegment(9)xdr_stream_zero(9)xdr_buf_trim(9)xdr_stream_decode_string_dup(9)xdr_stream_decode_opaque_auth(9)xdr_stream_encode_opaque_auth(9)
like, read them all, they're all icons in their own right. π
and that's the page!! π§ before you go β this one came from ./net/sunrpc and it's dated October 2026. so like, future vibes. take care of her. ππβ¨
π¦ 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