From 7e18b9b752f7c731392c8fc18ad31a9e3e00c8a8 Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Fri, 29 May 2020 12:02:15 -0700 Subject: [PATCH] sync with libnvme --- libnvme | 2 +- nvme.c | 4 ++-- util/user-types.c | 18 +++++++++--------- util/user-types.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libnvme b/libnvme index be604f2..a2e4243 160000 --- a/libnvme +++ b/libnvme @@ -1 +1 @@ -Subproject commit be604f2e8f0f3c55a57684db14b24f510489c0df +Subproject commit a2e424322385bedfefbcf6620711083c7ff4f6c3 diff --git a/nvme.c b/nvme.c index 8cbef0c..3f20c67 100644 --- 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; diff --git a/util/user-types.c b/util/user-types.c index 49150ee..04230e9 100644 --- a/util/user-types.c +++ b/util/user-types.c @@ -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); diff --git a/util/user-types.h b/util/user-types.h index 34181d5..dad5f5b 100644 --- a/util/user-types.h +++ b/util/user-types.h @@ -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); -- 2.50.1