]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
sync with libnvme
authorKeith Busch <kbusch@kernel.org>
Fri, 29 May 2020 19:02:15 +0000 (12:02 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 29 May 2020 19:15:13 +0000 (12:15 -0700)
libnvme
nvme.c
util/user-types.c
util/user-types.h

diff --git a/libnvme b/libnvme
index be604f2e8f0f3c55a57684db14b24f510489c0df..a2e424322385bedfefbcf6620711083c7ff4f6c3 160000 (submodule)
--- a/libnvme
+++ b/libnvme
@@ -1 +1 @@
-Subproject commit be604f2e8f0f3c55a57684db14b24f510489c0df
+Subproject commit a2e424322385bedfefbcf6620711083c7ff4f6c3
diff --git a/nvme.c b/nvme.c
index 8cbef0cbf865a0a93f86915cde68761c047bde6c..3f20c671ae5ddcc978bdebb4ff5a77debc244990 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -295,7 +295,7 @@ void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries,
        nvme_print_object(nvme_error_log_to_json(err_log, entries, flags));
 }
 
-void nvme_show_resv_report(struct nvme_reservation_status *status, int bytes,
+void nvme_show_resv_report(struct nvme_resv_status *status, int bytes,
        __u32 cdw11, enum nvme_print_flags flags)
 {
        nvme_print_object(nvme_resv_report_to_json(status, cdw11 & 1, flags));
@@ -3813,7 +3813,7 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin
        const char *eds = "request extended data structure";
        const char *raw = "dump output in binary format";
 
-       struct nvme_reservation_status *status;
+       struct nvme_resv_status *status;
        enum nvme_print_flags flags;
        int err, fd;
 
index 49150ee1b9282e265480dcfbd1f20d9fdb9eafc8..04230e9cf061fc94342f980fe46e94f490c2b271 100644 (file)
@@ -3242,8 +3242,8 @@ static struct json_object *nvme_id_ns_granularity_desc_to_json(
 {
        struct json_object *jgran = nvme_json_new_object(flags);
 
-       nvme_json_add_le64(jgran, "nszeg", gran->namespace_size_granularity);
-       nvme_json_add_le64(jgran, "ncapg", gran->namespace_capacity_granularity);
+       nvme_json_add_le64(jgran, "nszegran", gran->nszegran);
+       nvme_json_add_le64(jgran, "ncapgran", gran->ncapgran);
 
        return jgran;
 }
@@ -3277,12 +3277,12 @@ static json_object *nvme_nvmset_attr_to_json(
 {
        struct json_object *jattr = nvme_json_new_object(flags);
 
-       nvme_json_add_le16(jattr, "nvmsetid", attr->id);
-       nvme_json_add_le16(jattr, "egi", attr->endurance_group_id);
-       nvme_json_add_le32(jattr, "r4krt", attr->random_4k_read_typical);
-       nvme_json_add_le32(jattr, "ows", attr->opt_write_size);
-       nvme_json_add_int128(jattr, "tnvmsetcap", attr->total_nvmset_cap);
-       nvme_json_add_int128(jattr, "unvmsetcap", attr->unalloc_nvmset_cap);
+       nvme_json_add_le16(jattr, "nvmsetid", attr->nvmsetid);
+       nvme_json_add_le16(jattr, "endgit", attr->endgid);
+       nvme_json_add_le32(jattr, "rr4kt", attr->rr4kt);
+       nvme_json_add_le32(jattr, "ows", attr->ows);
+       nvme_json_add_int128(jattr, "tnvmsetcap", attr->tnvmsetcap);
+       nvme_json_add_int128(jattr, "unvmsetcap", attr->unvmsetcap);
 
        return jattr;
 }
@@ -4183,7 +4183,7 @@ static struct json_object *nvme_resv_ctrl_ext_to_json(
 }
 
 struct json_object *nvme_resv_report_to_json(
-       struct nvme_reservation_status *status, bool ext,
+       struct nvme_resv_status *status, bool ext,
        unsigned long flags)
 {
        int i, regctl = status->regctl[0] | (status->regctl[1] << 8);
index 34181d5733ea6b4d4aa548e5e4c4e3276e370680..dad5f5b6dcbfb80e4732daa8ed57454b76a368ff 100644 (file)
@@ -131,7 +131,7 @@ struct json_object *nvme_ns_list_to_json(
        struct nvme_ns_list *list, unsigned long flags);
 
 struct json_object *nvme_resv_report_to_json(
-       struct nvme_reservation_status *status, bool ext,
+       struct nvme_resv_status *status, bool ext,
        unsigned long flags);
 
 struct json_object *nvme_json_new_str_len(const char *v, int len);