nfsd_open_local_fh(9)
π nfsd_open_local_fh β a whole kernel API manual, but make it make sense
okay so bestie, we're in the nfsd_open_local_fh(9) part of the Kernel API Manual today and honestly? she ate. lowkey a niche little function but the vibes are immaculate. let's get into it π«Ά
β¨ NAME β¨
nfsd_open_local_fh β lookup a local filehandle @nfs_fh and map to nfsd_file
like yes, that's the whole name section, she's concise, she's iconic, periodt π
πΈ SYNOPSIS πΈ
struct nfsd_file * nfsd_open_local_fh (struct net *net , struct
auth_domain *dom , struct rpc_clnt *rpc_clnt , const struct cred *cred ,
const struct nfs_fh *nfs_fh , struct nfsd_file __rcu **pnf , const
fmode_t fmode );
seven arguments, bestie, SEVEN. she's high maintenance but worth it ngl π
π ARGUMENTS π
netβ okay so the manpage literally gives zero description here. not a crumb. she's mysterious and we respect it πdomβ also no description given. the page just names her and moves on, main character energy fr frrpc_clntβ therpc_clntthat the client established β¨credβ thecredthat the client established π¦nfs_fhβ the filehandle to lookuppnfβ the place to find thenfsd_file, or store it if it was non-NULLfmodeβ thefmode_tto use for open
π₯ DESCRIPTION π₯
okay so here's what she actually does: this function maps a local fh to a path on a local filesystem. the way that's useful? when the nfs client has the local server mounted β then it can avoid all the NFS overhead with reads, writes and commits. no cap, she's literally skipping the whole traffic jam πβ¨
on successful return, the returned nfsd_file will have its nf_net member set. π
and listen β the caller (that's the NFS client, iykyk) is responsible for calling nfsd_net_put and nfsd_file_put (via nfs_to_nfsd_file_put_local). so like, don't forget, bestie, that's on you π«Ά
lowkey important: the caller owns the cleanup here.nfsd_net_putandnfsd_file_put(vianfs_to_nfsd_file_put_local) β do not ghost them π
π¦ SEE ALSO π¦
- Kernel file
./fs/nfsd/localio.cβ go read her, she's the source of truth π
and that's the page!! go forth and map those local filehandles, you absolute icon πβ
sign-off szn: this one's from ./fs/nfsd, dated October 2026, and it's nfsd_open_local_fh(9) β mwah, bye bestie ππ
π¦ 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