simple_setattr(9)
π 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β thedentry. yes queen, that's literally the description, and honestly? respect for keeping it real πiattrβ theiattrstructure. 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 π
simple_offset_init(9)simple_offset_add(9)simple_offset_remove(9)simple_offset_rename(9)simple_offset_rename_exchange(9)simple_offset_destroy(9)offset_dir_llseek(9)offset_readdir(9)simple_rename_timestamp(9)simple_write_end(9)simple_read_from_buffer(9)simple_write_to_buffer(9)memory_read_from_buffer(9)generic_encode_ino32_fh(9)generic_fh_to_dentry(9)generic_fh_to_parent(9)simple_fsync_noflush(9)simple_fsync(9)generic_check_addressable(9)simple_get_link(9)generic_ci_d_compare(9)generic_ci_d_hash(9)generic_ci_match(9)generic_set_sb_d_ops(9)inode_maybe_inc_iversion(9)inode_query_iversion(9)simple_inode_init_ts(9)path_from_stashed(9)simple_start_creating(9)
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
- 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