fh_getattr(9)
π fh_getattr(9) β the kernel API manual, bestie edition β¨
Ok so real talk, this is a page from the Kernel API Manual, and it's about fh_getattr(9) β literally one of the most "small but crucial" functions in the nfsd friend group. It's giving supporting-character-who-ate-every-scene energy. π
πΈ NAME πΈ
fh_getattr β retrieve attributes on a local file. That's it, that's the whole vibe. It grabs the attrs, it hands them over, it slays. π
β¨ SYNOPSIS β¨
__be32 fh_getattr (const struct svc_fh *fhp , struct kstat *stat );
No cap, that's the whole signature. __be32 in, __be32 out, everybody claps. π«Ά
π¦ ARGUMENTS π¦
fhpβ the file handle of the target file. Like, which file are we even talking about? This. This is the one. It's the main character of the operation. πstatβ a caller-suppliedkstatbuffer that gets filled in. You bring the empty cup, the function pours the attributes in. Fill-in-the-blank but make it kernel. π
π DESCRIPTION π
So what does it actually do? It returns nfs_ok on success. That's the win. That's the slay. β¨
But if it doesn't go well? Then an NFS status code comes back instead. Not nfs_ok. A whole different code. Read it, don't ignore it, okay? π
π₯ SEE ALSO π₯
These are the besties it runs with, all living in the kernel file ./fs/nfsd/nfsfh.c:
__fh_verify(9)fh_verify_local(9)fh_verify(9)fh_fill_pre_attrs(9)fh_fill_post_attrs(9)fh_fill_both_attrs(9)nfsd4_change_attribute(9)
Go read them too, they're all part of the same little ecosystem, iykyk. π
And that's the page, bestie π β brought to you by ./fs/nfsd, dated October 2026, filed under fh_getattr(9). Periodt. π
πΈ
π¦ 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