from_kqid_munged(9)
π from_kqid_munged(9) β kernel API manual, bestie edition β¨
okay so real talk, this page lives in the Kernel API Manual and it's about from_kqid_munged, and honestly? it's the chill, dependable one of the qid family. let's get into it π«Ά
β¨ NAME β¨
from_kqid_munged β Create a qid from a kqid user-namespace pair.
like, that's the whole gig. one qid, one namespace, no drama π
π SYNOPSIS π
qid_t from_kqid_munged (struct user_namespace *targ , struct kqid kqid
);
yep, that's the signature, copy it exactly, don't be weird about it β¨
π¦ ARGUMENTS π¦
targβ The user namespace we want a qid in. literally "where do you want this qid delivered" energy π¦kqidβ The kernel internal quota identifier to start with. this is the starting point, the raw material, the before picture πΈ
π₯ DESCRIPTION π₯
Map kqid into the user-namespace specified by targ and return the resulting qid. that's it, that's the mapping πΊοΈ
There is always a mapping into the initial user_namespace. so like, no matter what, the initial namespace always has your back π
Unlike from_kqid, from_kqid_munged never fails and always returns a valid projid. never fails. not once. not ever. it's giving unbothered icon behavior π and honestly that's exactly why from_kqid_munged is appropriate for use in places where failing to provide a qid_t is not a good option β some call sites just cannot be doing the "oops no qid for you" thing π
If kqid has no mapping in targ, the kqid.type specific overflow identifier is returned. no cap, that's the fallback, and it's type-specific, so don't go assuming it's one universal magic number π
nb bestie: "never fails" is the whole personality of this function. no error path, no NULL, just a valid projid, always. slay π
π SEE ALSO π
- Kernel file
./fs/quota/kqid.c qid_eq(9)qid_lt(9)from_kqid(9)qid_valid(9)
go read the source, it's right there, iykyk πβ¨
and that's the page!! sourced from ./fs/quota, dated October 2026, filed under from_kqid_munged(9) β mwah, go forth and munge those qids responsibly ππ§π
π¦ 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