__ns_tree_gen_id(9)
π __ns_tree_gen_id β Kernel API Manual β¨
okay bestie, we're diving into the Kernel API Manual for __ns_tree_gen_id(9). buckle up, it's giving namespace id creation energy π
πΈ NAME πΈ
__ns_tree_gen_id β literally generates a new namespace id, that's the whole gig π
β¨ SYNOPSIS β¨
u64 __ns_tree_gen_id (struct ns_common *ns , u64 id );
π«Ά ARGUMENTS π«Ά
nsβ the namespace you want to generate an id for. that's the main character right there πidβ if this is non-zero, then this is the initial namespace and this is a fixed id. so like, you're calling the shots on the number π₯
π¦ DESCRIPTION π¦
so what it does: it generates a new namespace id and assigns it to the namespace. slay β¨
and here's the iconic part β all namespace types share the same id space, so you can compare them directly. IOW, when two ids of two namespaces are equal, they are identical. no cap, fr fr π―
π SEE ALSO π
- Kernel file
./kernel/nstree.c ns_tree_node_init(9)ns_tree_root_init(9)ns_tree_node_empty(9)ns_tree_node_add(9)ns_tree_node_del(9)__ns_tree_adjoined_rcu(9)
π go read those, iykyk β they're all hanging out in ./kernel and they're lowkey obsessed with each other π§
mwah π this page lives in ./kernel, from the October 2026 edition of the Kernel API Manual β catch you in the next one, bestie! π
π¦ 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