nfsd_setattr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 if ctime.tv_sec does 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 release fhp by calling fh_put in 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:

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