nfsd4_block_...de_layoutget(9)
π nfsd4_block_encode_layoutget β like, the whole vibe β¨
okay so bestie, you're in the Kernel API Manual and today's main character is nfsd4_block_encode_layoutget(9). Buckle up π
πΈ NAME πΈ
nfsd4_block_encode_layoutget β encode a block/scsi layout extent array. that's it, that's the job, and she does it flawlessly π
β¨ SYNOPSIS β¨
__be32 nfsd4_block_encode_layoutget (struct xdr_stream *xdr , const
struct nfsd4_layoutget *lgp );
so we return a __be32 (iykyk, that's the nfs error code situation) and we take two things. slay.
π¦ ARGUMENTS π¦
xdrβ the stream for data encoding. it's the little conveyor belt the data gets written onto, no cap.lgpβ the layoutget content, which is actually an array of extents to encode. yes bestie, an array. multiple extents. she's not doing just one π
π DESCRIPTION π
okay so the whole point: this function encodes the opaque loc_body field in the layoutget response. that's the assignment, that's what she ate π₯
and here's the tea β β the pnfs_block_layout4 and pnfs_scsi_layout4 structures on the wire are the same, literally identical, so both layout drivers use this one function. one function, two drivers, zero notes. iconic behavior honestly π
β Return values β
nfs_okβ success!! all the extents got encoded intoxdr, every single one, she left nothing behind π«Άnfserr_toosmallβ not enough space inxdrto encode all the data π the conveyor belt ran out of room, tragic, truly tragic
π SEE ALSO π
- Kernel file
./fs/nfsd/blocklayoutxdr.cβ go look at her house π nfsd4_block_decode_layoutupdate(9)β the decode counterpart, the other half of the storynfsd4_scsi_decode_layoutupdate(9)β and the scsi decode one too, we love a matching set π
and that's the page!! brought to you by the source ./fs/nfsd, dated October 2026, under the nfsd4_block_...de_layoutget(9) banner. mwah π bye bestie, go encode some extents π§ββοΈβ¨
π¦ 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