summaryrefslogtreecommitdiffstats
path: root/src/nvme/private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvme/private.h')
-rw-r--r--src/nvme/private.h10
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 */