nfsd_cache_update(9)
β¨ nfsd_cache_update β¨
Okay bestie, so this is a kernel API manual page for nfsd_cache_update β and before you ask, yes, it's literally about the duplicate reply cache in the NFS server. We're talking about updating one tiny little entry in that cache, and it's giving very "behind the scenes main character energy" because you never see it, but it's doing SO much. π
πΈ SYNOPSIS πΈ
void nfsd_cache_update (struct svc_rqst *rqstp , struct nfsd_cacherep
*rp , int cachetype , __be32 *statp );
π ARGUMENTS π
rqstpβ ansvc_rqstthat's got a finished Reply, like it's all done and ready to slay β¨rpβ IN: the DRC entry for this request. Think of it as the little cache passport for this specific request πcachetypeβ tells you which cache we're updating. Choose wisely, bestie πstatpβ a pointer to the Reply's NFS status code, orNULL. Lowkey nullable, highkey important π«Ά
π¦ DESCRIPTION π¦
So here's the tea: this function gets called from nfsd_dispatch when the procedure has been executed and the complete reply is sitting pretty in rqstp->rq_res. Iconic. π
We're copying around data here instead of swapping buffers β and the reason is actually so real. The toplevel loop requires max-sized buffers, and using those for a cache that has a max reply size of just 100 bytes (diropokres) would be a total waste of memory. Not the vibe. Not it. π
And get this β if we ever start using different types of cache entries tailored specifically for attrstat and fh's, we might save even more space. Future us could really eat with that. π₯
Also note (important bestie!): acachetypeofRC_NOCACHEcan legally be passed whennfsdfailed to encode a reply that otherwise would have been cached. In this case,nfsd_cache_updateis called withstatp==NULL. No cap, that's just how it is. π
π SEE ALSO π
Kernel file ./fs/nfsd/nfscache.c, plus these iconic functions that you should fr fr check out:
That's the whole page, bestie β every flag, every argument, every lil' detail preserved with love. π This gem lives in ./fs/nfsd and the source/version is from October 2026, so mark your calendar. Stay cunty, stay cached. πβ¨π¦
π¦ 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