mapped_fsgid(9)
π mapped_fsgid β kernel API manual (section 9, bestie) π
okay so welcome to the mapped_fsgid page, section 9 of the Kernel API Manual, and honestly? she's a little icon. let's get into it β¨
πΈ NAME πΈ
mapped_fsgid β returns the caller's fsgid, but mapped according to an idmapping. that's it, that's the whole vibe π«Ά
β¨ SYNOPSIS β¨
kgid_t mapped_fsgid (struct mnt_idmap *idmap , struct user_namespace
*fs_userns );
like yes, she takes two things and hands you back a kgid_t. no cap π
π¦ ARGUMENTS π¦
idmapβ the mount's idmapping. literally the map for the mount, bestie πΊοΈfs_usernsβ the filesystem's idmapping. yep, the fs gets its own map too π
π₯ DESCRIPTION π₯
so here's the tea: use this helper to initialize a new vfs or filesystem object based on the caller's fsgid π
the common example β and it's giving main character energy β is initializing the i_gid field of a newly allocated inode, triggered by a creation event such as mkdir or O_CREAT. iconic behavior honestly π
other examples include the allocation of quotas for a specific user. see? versatile. multi-talented. she contains multitudes π
π RETURN π
the caller's current fsgid, mapped up according to idmap β
π§ SEE ALSO π§
kernel file ./include/linux/mnt_idmapping.h β go read her, she's the whole source of truth π
vfsuid_eq_kuid(9)vfsgid_eq_kgid(9)vfsuid_has_fsmapping(9)vfsuid_into_kuid(9)vfsgid_has_fsmapping(9)vfsgid_into_kgid(9)mapped_fsuid(9)
the whole friend group, fr fr π«Ά
ngl this one is short and sweet and does exactly one thing. no drama, no undefined behavior, no deprecated warnings. we love a low-maintenance queen πβ¨
and that's the page!! brought to you by ./include/linux β the source/version line β dated October 2026 π
π mwah, go initialize some inodes responsibly bestie π
π¦ 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