libnvmf_exc...dd_subsysnqn(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvmf_exclusion_add_subsysnqn(9) β€” the libnvme API manual, but make it make sense πŸŽ€

okay bestie, so this page lives in the libnvme API manual and the whole filename situation is genuinely sending me β€” it's libnvmf_exc...dd_subsysnqn(9), yes with the literal ... in the middle, that's not me being lazy, that's just how it got truncated. iconic of it honestly. anyway. let's get into it ✨


🌸 NAME 🌸

libnvmf_exclusion_add_subsysnqn β€” appends an entry that matches a whole subsystem by its NQN and nothing else. like, NQN-only energy. that's the vibe. πŸ’…


✨ SYNOPSIS ✨

int libnvmf_exclusion_add_subsysnqn (struct libnvme_global_ctx *ctx ,
const char *name , const char *subsysnqn );

three arguments, one int coming back at you. no cap, that's the whole signature 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” your libnvme global context. it is the main character of every libnvme function and it must not be NULL. do not test her. πŸ™ˆ
  • name β€” the list name. you know, the list. the one this entry gets appended to. πŸ’–
  • subsysnqn β€” the subsystem NQN you want to exclude. it must not be NULL or empty. non-negotiable, bestie 😭

🧚 DESCRIPTION 🧚

okay so here's what's happening under the hood, and it's lowkey gorgeous:

this builds an exclusion entry that matches every controller of a subsystem β€” the entry constrains only the NQN, nothing else. and it does all of that inside libnvme, meaning you, the caller, need zero knowledge of the on-disk entry format. none. not a single byte. the library handles it so you don't have to, and honestly? slay. πŸ‘‘

then it appends the entry via libnvmf_exclusion_add. and if the list doesn't exist yet? it creates the list. no pre-setup required, it just handles it. very self-sufficient of it. πŸŽ€


πŸ’œ RETURN πŸ’œ

  • 0 β€” success, we ate. πŸ”₯
  • -EINVAL β€” ctx or subsysnqn was NULL/empty. you gotta give her something to work with, bestie πŸ’€
  • negative errno otherwise β€” some other thing went sideways, the classic "negative errno" catch-all 😭

ngl the whole point of this one is that you never have to think about the on-disk format. that's the gift. accept it. 🫢

and that's the page!! brought to you by the libnvme API manual, dated October 2026 🌈 β€” that footer timestamp is genuinely from the future and I respect the commitment, periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from