ns_match(9)
π ns_match(9) β like, the Kernel API Manual page you didn't know you needed
okay so bestie, welcome to ns_match(9), straight out of the Kernel API Manual β¨ and ngl this one is a lil snack: it's a tiny little yes/no machine and honestly? it ate. Let's get into it π
πΈ NAME πΈ
ns_match β returns true if the current namespace matches the dev/ino you handed it π
Like, that's the whole vibe. You give it a namespace and a couple of numbers, it tells you if they're a match. It's giving matchmaker but for kernel internals π«Ά
β¨ SYNOPSIS β¨
bool ns_match (const struct ns_common *ns , dev_t dev , ino_t ino );
that's it. that's the whole signature. no cap π
π¦ ARGUMENTS π¦
nsβ the current namespace, typed as aconst struct ns_common *. It's the main character here πdevβ adev_tfrom nsfs that's gonna get matched against the current nsfs π₯inoβ anino_tfrom nsfs that will be matched against the current nsfs β
so like, dev and ino are the two lil numbers coming in from nsfs, and they get vibe-checked against the current nsfs. iykyk π
fr fr, keep the types straight:devisdev_t,inoisino_t, andnsisconst struct ns_common *. no mixing and matching, bestie π
π§ RETURN π§
it returns true if dev and ino match the current nsfs. that's the entire deal β true = match, and that's the only outcome documented here, so don't go inventing extra lore π
π SEE ALSO π
- the kernel file
./fs/nsfs.cβ go read the source, it's literally right there π open_namespace(9)β the icon, the legend, the related manpage π
okay that's the page!! π before you go β the source/version line says this one lives in ./fs, and it's dated October 2026, so jot that down in your notes app bestie π mwah, go match some namespaces, you're gonna slay πβ¨π¦
π¦ 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