nfsd_commit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’Ύ 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:

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