nfsd_write(9)
β¨ 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_writemay modify it πoffsetβ byte offset of the start, i.e. where in the file we're dropping the payload πpayloadβ anxdr_bufcontaining 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 NFSstable_howvalue π§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 π¦
- Kernel file
./fs/nfsd/vfs.c nfserrno(9)nfsd_lookup(9)nfsd_setattr(9)nfsd4_is_junction(9)nfsd_open_verified(9)nfsd_splice_read(9)nfsd_iter_read(9)nfsd_vfs_write(9)nfsd_read_splice_ok(9)nfsd_read(9)nfsd_commit(9)nfsd_create_setattr(9)nfsd_symlink(9)nfsd_link(9)nfsd_rename(9)nfsd_unlink(9)nfsd_readdir(9)nfsd_filp_close(9)nfsd_removexattr(9)nfsd_get_case_info(9)
like, the whole friend group, all linked up, iconic π
ok periodt π that's the page. go callfh_putonfhp, 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
- 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