from_kqid_munged(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

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