diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:51:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:51:44 +0000 |
commit | 4da5b4b2fba02bd3e78f16828359cef79a757911 (patch) | |
tree | 326db4edaddfc20f78fb048509fd646f497e2a65 /src/nvme/private.h | |
parent | Adding upstream version 1.5. (diff) | |
download | libnvme-4da5b4b2fba02bd3e78f16828359cef79a757911.tar.xz libnvme-4da5b4b2fba02bd3e78f16828359cef79a757911.zip |
Adding upstream version 1.7.1.upstream/1.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/nvme/private.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nvme/private.h b/src/nvme/private.h index 809b3bb..ee9d738 100644 --- a/src/nvme/private.h +++ b/src/nvme/private.h @@ -106,6 +106,7 @@ struct nvme_subsystem { char *firmware; char *subsystype; char *application; + char *iopolicy; }; struct nvme_host { @@ -179,7 +180,9 @@ int json_dump_tree(nvme_root_t r); nvme_ctrl_t __nvme_lookup_ctrl(nvme_subsystem_t s, const char *transport, const char *traddr, const char *host_traddr, const char *host_iface, const char *trsvcid, - nvme_ctrl_t p); + const char *subsysnqn, nvme_ctrl_t p); + +void *__nvme_alloc(size_t len); #if (LOG_FUNCNAME == 1) #define __nvme_log_func __func__ @@ -197,6 +200,11 @@ __nvme_msg(nvme_root_t r, int lvl, const char *func, const char *format, ...); format, ##__VA_ARGS__); \ } while (0) +#define root_from_ctrl(c) ((c)->s && (c)->s->h ? (c)->s->h->r : NULL) +#define root_from_ns(n) ((n)->s && (n)->s->h ? (n)->s->h->r : \ + (n)->c && (n)->c->s && (n)->c->s->h ? (n)->c->s->h->r : \ + NULL) + /* mi internal headers */ /* internal transport API */ |