vfsgid_has_fsmapping(9)
π vfsgid_has_fsmapping β check whether a vfsgid maps into the filesystem
okay so bestie, this is vfsgid_has_fsmapping(9) from the Kernel API Manual, and it's literally the "does this group ID even exist over here" check. tiny function, huge main character energy. let's go π¦
β¨ SYNOPSIS β¨
bool vfsgid_has_fsmapping (struct mnt_idmap *idmap , struct
user_namespace *fs_userns , vfsgid_t vfsgid );
it returns a bool, it takes three things, and yes the spacing in that signature is exactly how it shipped β we don't fix, we don't merge, we just vibe π
πΈ ARGUMENTS πΈ
idmapβ the mount's idmapping. this is your mount's little translation dictionary, keep it close π«Άfs_usernsβ the filesystem's idmapping. this is the filesystem's dictionary, and it is a completely different dictionary, which is the whole plot of this function nglvfsgidβ the vfsgid to be mapped. the actual group id we're asking about π
π DESCRIPTION π
so here's the tea: this function checks whether vfsgid has a mapping in the filesystem idmapping. that's it. that's the whole thing.
use this function to check whether the filesystem idmapping has a mapping for vfsgid. like, "does the filesystem have a seat for this gid at the table, or is it gonna get turned into the overflow id and have a bad time π"
it's a vibe check for gids. no cap, that's the function β¨
π₯ RETURN π₯
trueβvfsgidhas a mapping in the filesystem. slay πfalseβ it does not. it's giving unmapped π
π SEE ALSO π
- Kernel file
./include/linux/mnt_idmapping.hβ go read the header, it's iconic vfsuid_eq_kuid(9)vfsgid_eq_kgid(9)vfsuid_has_fsmapping(9)vfsuid_into_kuid(9)vfsgid_into_kgid(9)mapped_fsuid(9)mapped_fsgid(9)
the whole idmapping friend group fr fr, they all show up together π§
lowkey reminder: this one asks the filesystem's idmapping, not the mount's. don't mix up your dictionaries or you will be so confused, iykyk π
okay that's the page!! this gem lives in ./include/linux, and the version tag on it is October 2026 β so mark your calendar bestie, and remember the page you just read was vfsgid_has_fsmapping(9) from the Kernel API Manual. 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