nfsd_commit(9)
πΎ nfsd_commit(9) β the Kernel API Manual one, bestie
okay so real talk, this is nfsd_commit(9) from the Kernel API Manual and it's literally the "flush ur vibes to disk" function. let's get into it π«Ά
β¨ NAME β¨
nfsd_commit β Commit pending writes to stable storage
like, it makes the writes actually real. no cap. π
πΈ SYNOPSIS πΈ
__be32 nfsd_commit (struct svc_rqst *rqstp , struct svc_fh *fhp , struct
nfsd_file *nf , u64 offset , u32 count , __be32 *verf );
six args, one return, and a whole lot of __be32 energy. slay. β¨
π ARGUMENTS π
rqstpβ the RPC request currently being processed, i.e. the main character of this whole operation πfhpβ the NFS filehandle. it's giving "which file are we even talking about" π¦nfβ the target file. the actual vibe recipient πoffsetβ the raw offset from the beginning of the file πcountβ the raw count of bytes to sync. how much we're committing, fr fr π₯verfβ gets filled in with the server's current write verifier β¨
π NOTE π
okay so important stuff, pay attention bestie:
we guarantee that data lying within the range specified by the offset and count parameters will be synced. periodt. π
but!!! the server is permitted to sync data that lies outside this range at the same time β so like, it might do a little extra, and that's fine, that's allowed π
and unfortunately π we cannot lock the file to make sure we return full WCC data to the client, because locking happens lower down in the filesystem. so no locking, no full WCC guarantee, that's just the way it is. not us being lazy, it's an architecture thing.
Return values: an nfsstat value in network byte order. that's it, that's the return. β
π§ SEE ALSO π§
all my fave siblings in 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_read(9)nfsd_write(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)
every single one accounted for, you're welcome π
and that's the whole page! shoutout to ./fs/nfsd for the source and October 2026 for the date β that's the version + date combo tagged at the bottom, and now you know it. 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