simple_setattr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… simple_setattr(9) β€” like, the whole page ✨

okay so bestie, we're in the Kernel API Manual today and the star of the show is simple_setattr(9). pull up a chair, grab a boba, this one's short but it's giving "small but mighty" πŸŽ€


✨ NAME ✨

simple_setattr β€” the setattr for a simple filesystem. that's it. that's the whole vibe check πŸ¦‹


🌸 SYNOPSIS 🌸

int simple_setattr (struct mnt_idmap *idmap , struct dentry *dentry ,
struct iattr *iattr );

three arguments, one int coming back at you. no cap πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • idmap β€” the idmap of the target mount. iykyk, it's the identity-mapping situation for the mount you're touching.
  • dentry β€” the dentry. yes queen, that's literally the description, and honestly? respect for keeping it real πŸ™ˆ
  • iattr β€” the iattr structure. that's where all your attribute-change wishes live.

πŸ’– DESCRIPTION πŸ’–

so here's the tea: it returns 0 on success, and -error on failure. simple as that, no notes πŸ”₯

simple_setattr is a simple ->setattr implementation without a proper implementation of size changes. like, it just doesn't do the size-change thing properly, and we're all just living with that information πŸ’€

it can be used in exactly two (2) situations, bestie:

  • for in-memory filesystems, or
  • for special files on simple regular filesystems.
and here's the warning part, pay attention: anything that needs to change on-disk or wire state on size changes needs its own setattr method. don't try to make this one do that. it will not slay. it will not eat. it will simply not do it 😭

πŸ”₯ SEE ALSO πŸ”₯

okay this list is long and honestly kind of iconic for it. all of these live in the kernel file ./fs/libfs.c, and here's every single one, no skipping, no summarizing, we are thorough in this house πŸ‘‘

like, twenty-nine cross-references? she's connected. she knows everybody at the party 🌈⭐


and that's the whole page, bestie 🫢 sign-off time: this little icon comes from ./fs, dated October 2026, and she's filed under simple_setattr(9). periodt πŸ’œπŸ§š

πŸ“¦ where this page comes from