nfsd_read(9)
π nfsd_read(9) π
ok so bestie, welcome to nfsd_read β it's from the Kernel API Manual, and it does exactly one thing and does it slay: read data from a file. That's the whole vibe. π
β¨ SYNOPSIS β¨
__be32 nfsd_read (struct svc_rqst *rqstp , struct svc_fh *fhp , loff_t
offset , unsigned long *count , u32 *eof );
like, yes, that's the whole signature. yes, the line break is real. no cap. π
πΈ ARGUMENTS πΈ
okay let's go through the cast of characters one by one, they all matter:
rqstpβ the RPC transaction context. think of it as the group chat this whole operation is happening in π«Άfhpβ the file handle of the file you're reading from. the main character, honestly πoffsetβ starting byte offset. where in the file we're kicking things off. literally just the starting point bestie πcountβ this one's doing double duty and honestly, iconic: IN: the requested number of bytes; OUT: the number of bytes actually read. she comes in with one job and leaves with a different one π β¨eofβ OUT: set non-zero if the operation reached the end of the file. so you know when you've hit the wall π§±
π¦ DESCRIPTION π¦
okay so before you even think about calling this, the caller must verify that there's enough space in rqstp.rq_res to perform this operation. like, that's on you, not on me. do your vibe check first β
β οΈ N.B. β After this callfhpneeds anfh_put. do NOT forget this part, i'm so serious π it's giving "you broke it, you fix it" energy.
Returns nfs_ok on success, otherwise an nfserr stat value gets returned. that's it, that's the contract π€
π SEE ALSO π
okay the friend group is LARGE and i love them all, here we go β from the 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_write(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)
anyway that's the page π this whole thing lives in ./fs/nfsd, it's part of the Kernel API Manual, and it's dated October 2026 β so mark your calendars bestie, see u then ποΈβ¨ 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