nfsd4_block_...de_layoutget(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 into xdr, every single one, she left nothing behind 🫢
  • nfserr_toosmall β€” not enough space in xdr to encode all the data 😭 the conveyor belt ran out of room, tragic, truly tragic

🌈 SEE ALSO 🌈


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