nfsd_setattr(9)
β¨ nfsd_setattr(9) β¨
okay so bestie, this is a page from the Kernel API Manual and it's literally all about nfsd_setattr β the little icon that sets various file attributes π
like it's giving file-glow-up energy and we're obsessed.
πΈ NAME πΈ
nfsd_setattr β set various file attributes. that's it, that's the vibe π
π¦ SYNOPSIS π¦
__be32 nfsd_setattr (struct svc_rqst *rqstp , struct svc_fh *fhp ,
struct nfsd_attrs *attr , const struct timespec64 *guardtime );
no cap, that's the whole signature. copy it exactly, bestie, don't be out here renaming things π
π ARGUMENTS π
rqstpβ the controlling RPC transaction. like, the main character of this whole call π«Άfhpβ the filehandle of the target. it's pointing at the file we're about to give a whole new look β¨attrβ the attributes to set. the actual lewk we're serving πguardtimeβ do not act ifctime.tv_secdoes not match this timestamp. fr fr, it's a vibe check: if the timestamp doesn't match, we simply do not proceed π
π§ DESCRIPTION π§
so this call may adjust the contents of attr β and lowkey that's important, bestie. in particular, this call may change the bits in the na_iattr.ia_valid field. like it's editing its own homework, but make it kernel π
it returns nfs_ok on success. otherwise, an NFS status code is returned. either way, the caller must release fhp by calling fh_put. no exceptions, no "I'll do it later", periodt. π«Ά
π reminder: caller must releasefhpby callingfh_putin either case β success or not, bestie. don't leave that filehandle hanging, it's not cute.
π SEE ALSO π
Kernel file ./fs/nfsd/vfs.c and honestly the whole friend group:
nfserrno(9)nfsd_lookup(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_commit(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)
like, the whole squad is here and they all ate π₯π
that's the page, bestie π sourced from ./fs/nfsd, dated October 2026, and brought to you by the Kernel API Manual β mwah, slay, bye πβ¨π¦
π¦ 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