mapped_fsgid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ“–

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