Allow to retrieve the iopolicy settings for the subsystem.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme_host_release_fds;
nvme_ns_release_fd;
nvme_root_release_fds;
+ nvme_subsystem_get_iopolicy;
nvme_subsystem_release_fds;
};
char *firmware;
char *subsystype;
char *application;
+ char *iopolicy;
};
struct nvme_host {
s->application = strdup(a);
}
+const char *nvme_subsystem_get_iopolicy(nvme_subsystem_t s)
+{
+ return s->iopolicy;
+}
+
nvme_ctrl_t nvme_subsystem_first_ctrl(nvme_subsystem_t s)
{
return list_top(&s->ctrls, struct nvme_ctrl, entry);
free(s->subsystype);
if (s->application)
free(s->application);
+ if (s->iopolicy)
+ free(s->iopolicy);
free(s);
}
s->sysfs_dir = (char *)path;
if (s->h->r->application)
s->application = strdup(s->h->r->application);
+ s->iopolicy = nvme_get_attr(path, "iopolicy");
return 0;
}
*/
void nvme_subsystem_set_application(nvme_subsystem_t s, const char *a);
+/**
+ * nvme_subsystem_get_iopolicy() - Return the IO policy of subsytem
+ * @s: nvme_subsystem_t object
+ *
+ * Return: IO policy used by current subsystem
+ */
+const char *nvme_subsystem_get_iopolicy(nvme_subsystem_t s);
+
/**
* nvme_scan_topology() - Scan NVMe topology and apply filter
* @r: nvme_root_t object