nfsd_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ nfsd_write(9) ✨

okay so bestie, welcome to the nfsd_write(9) page from the Kernel API Manual β€” this is the one that opens a file and writes data to it πŸ’… like, that's the whole vibe. let's get into it 🫢


🌸 SYNOPSIS 🌸

__be32 nfsd_write (struct svc_rqst *rqstp , struct svc_fh *fhp , loff_t
offset , const struct xdr_buf *payload , unsigned long *cnt , int stable
, __be32 *verf );

literally the whole signature, untouched, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • rqstp β€” the RPC execution context, like the group chat the request is coming from πŸ’¬
  • fhp β€” file handle of the file you wanna write into; heads up, nfsd_write may modify it πŸ‘€
  • offset β€” byte offset of the start, i.e. where in the file we're dropping the payload πŸ“
  • payload β€” an xdr_buf containing the write payload, the actual data bestie πŸ“
  • cnt β€” IN: number of bytes to write, OUT: number of bytes actually written. so it goes in one number and comes out a (possibly different) number, main character energy honestly πŸ”₯
  • stable β€” an NFS stable_how value 🧚
  • verf β€” the NFS WRITE verifier ⭐

πŸ’– DESCRIPTION πŸ’–

k so here's the tea: upon return, the caller must invoke fh_put on fhp. not optional, not "if you feel like it", just do it πŸ™ˆ

Return values: an nfsstat value in network byte order 🌈 (yes, network byte order, don't @ me)


πŸ¦‹ SEE ALSO πŸ¦‹

like, the whole friend group, all linked up, iconic πŸ‘‘


ok periodt πŸ’… that's the page. go call fh_put on fhp, drink some water, and slay ✨

sign-off time bestie πŸŽ€ this gem is filed under ./fs/nfsd, dated October 2026, and it's literally the nfsd_write(9) page β€” catch you in the next manpage, mwah πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from