svcxdr_encode_fattr(9)
π svcxdr_encode_fattr β bestie's guide to packing NFSv2 file attributes β¨
okay so real talk, this is a page from the Kernel API Manual (yes, the kernel girlies have their own manual, we stay educated π) and it's literally about encoding NFSv2 file attributes into an XDR stream. Short page, but we're gonna make it iconic anyway π
πΈ NAME πΈ
svcxdr_encode_fattr β Encode NFSv2 file attributes β¨
π¦ SYNOPSIS π¦
bool svcxdr_encode_fattr (struct svc_rqst *rqstp , struct xdr_stream
*xdr , const struct svc_fh *fhp , const struct kstat *stat );
not me pasting that signature exactly as-is because we do not mess with the source, periodt π
π ARGUMENTS π
rqstpβ the Context of a completed RPC transaction π«Ά like, this is the whole vibe of the request that already finished, bestiexdrβ the XDR stream π the actual stream we're writing into, main character energyfhpβ File handle to encode π₯ the file handle we're about to shove in therestatβ Attributes to encode β the attribute goodies themselves
β¨ DESCRIPTION β¨
So what does it actually do? It gives you back a bool, and here's the vibe check on return values π
falseβ Send buffer space was exhausted π the buffer said "no ma'am" β you ran out of roomtrueβ Success π slay, it worked
that's it, that's the whole description, she's lowkey but she serves πΈ
ngl bestie, if you get false back that's not a "cry about it" moment, it's a "the send buffer ran out of space" moment β important distinction π
π SEE ALSO π
- Kernel file
./fs/nfsd/nfsxdr.cπ§ svcxdr_encode_stat(9)svcxdr_decode_fhandle(9)nfssvc_encode_nfscookie(9)nfssvc_encode_entry(9)
go read the whole friend group, they're all in the same orbit πͺ
and that's the page, bestie π«Ά brought to you from ./fs/nfsd π dated October 2026 πΈ β version of the Kernel API Manual, obviously, we would never leave the source and date out, iykyk π
β¨
π¦ 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