ns_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a const struct ns_common *. It's the main character here πŸ’…
  • dev β€” a dev_t from nsfs that's gonna get matched against the current nsfs πŸ”₯
  • ino β€” an ino_t from 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: dev is dev_t, ino is ino_t, and ns is const 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