nfsd_iter_read(9)
πΈ nfsd_iter_read β the kernel-api manual, bestie edition πΈ
okay so real talk, this one's from the Kernel API Manual (section 9, nfsd_iter_read(9)), and it's genuinely the "hold my iced coffee" fallback of the NFSd read world. let's get into it π
β¨ NAME β¨
nfsd_iter_read β do a VFS read, but with an iterator. that's it, that's the vibe π¦
π SYNOPSIS π
__be32 nfsd_iter_read (struct svc_rqst *rqstp , struct svc_fh *fhp ,
struct nfsd_file *nf , loff_t offset , unsigned long *count , unsigned
int base , u32 *eof );
no cap, that's the whole signature. seven little parameters, all of them main characters π
π ARGUMENTS π
rqstpβ the RPC transaction context. like, the whole situation this call is living inside of β¨fhpβ file handle of the file we're reading. the little ID card for the file πͺͺnfβ the already-openedstruct nfsd_fileof the file to be read. somebody already did the opening, we're just here for the reading π«Άoffsetβ the starting byte offset. where in the file we're kicking things off βcountβ IN: the number of bytes you're asking for. OUT: the number of bytes you actually got. it's giving "this meeting could've been an email" but honestly it's just how the parameter works πbaseβ the offset in the first page of the read buffer. yep, it's an offset inside a buffer, we love a nested coordinate moment πeofβ OUT: gets set to non-zero if the operation reached the end of the file. the "we've hit the wall, bestie" flag π§±
π¦ DESCRIPTION π¦
so some filesystems or some situations literally cannot use nfsd_splice_read. it's not their fault, it's just a whole thing. for those cases, this function is the fallback β and yes, it's the slightly less-performant one. lowkey the backup dancer of the read functions, but she still ate π
on success it returns nfs_ok. if things go sideways, you get an nfserr stat value back instead. no drama, just error codes π
π₯ SEE ALSO π₯
kernel file ./fs/nfsd/vfs.c plus the whole friend group:
nfserrno(9), nfsd_lookup(9), nfsd_setattr(9), nfsd4_is_junction(9), nfsd_open_verified(9), nfsd_splice_read(9), nfsd_vfs_write(9), nfsd_read_splice_ok(9), nfsd_read(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)
like, the entire nfsd cinematic universe is in there. iykyk π
heads up bestie: this is the fallback path, not the fast one. if you're in a position to use nfsd_splice_read, that's the slay option. this one's for when that literally isn't possible π
and that's the page!! π it lives in ./fs/nfsd and it's dated October 2026 β go off, future manpage, we love a timestamped icon πβ¨
π¦ 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