i_gid_update(9)
π i_gid_update(9)
okay so bestie, welcome to the Kernel API Manual β yes, the whole manual, and today's main character is i_gid_update. it lives in section 9, which is the "kernel developer lore" section, iykyk. π«Ά
β¨ NAME β¨
i_gid_update β updates @inode's i_gid field. that's it. that's the whole vibe check. π
πΈ SYNOPSIS πΈ
void i_gid_update (struct mnt_idmap *idmap , const struct iattr *attr ,
struct inode *inode );
literally three args, no return value, no drama. well. some drama, see below. π
π¦ ARGUMENTS π¦
idmapβ theidmapof the mount this inode was found from. like, which mount's identity-mapping situation are we living in rn π«attrβ the new attributes of the inode. the fresh fit it's about to put on β¨inodeβ the inode we're updating. the one getting the glow-up, obviously π
π DESCRIPTION π
so what does it actually do? it safely updates the inode's i_gid field, and the whole point β the reason this function exists and you shouldn't just poke the field yourself, bestie, i'm begging β is that it translates the vfsgid of any idmapped mount into the filesystem's kgid. π₯
lowkey that translation is the entire personality of this function. mount-side id vs filesystem-side id, and this is the lil fairy π§ that carries the value across the bridge. no cap.
don't skip the "safely" part of the description. the safety is the feature. π
π SEE ALSO π
like, the entire friend group, fr fr. all of these are kernel-file ./include/linux/fs.h besties:
enum positive_aop_returns(9)struct address_space(9)struct file_ra_state(9)struct file(9)i_uid_into_vfsuid(9)i_uid_needs_update(9)i_uid_update(9)i_gid_into_vfsgid(9)i_gid_needs_update(9)inode_fsuid_set(9)inode_fsgid_set(9)fsuidgid_has_mapping(9)inode_set_ctime(9)file_write_started(9)file_write_not_started(9)struct renamedata(9)is_mgtime(9)iput_if_not_last(9)is_idmapped_mnt(9)file_start_write(9)file_end_write(9)kiocb_start_write(9)kiocb_end_write(9)name_is_dot_dotdot(9)name_contains_dotdot(9)inode_dio_begin(9)inode_dio_end(9)generic_ci_validate_strict_name(9)
like i said. the whole group chat. π
and that's the page!! π this gem ships from source path ./include/linux, dated October 2026, and it goes out to every i_gid_update(9) stan. slay, stay safe, and always translate your vfsgid ππ
π¦ 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