From a751023422eadf87cd8d6484878193a4914a9d85 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 26 Jul 2022 07:11:33 +0200 Subject: Adding upstream version 2.1~rc0. Signed-off-by: Daniel Baumann --- plugins/zns/zns.c | 16 ++++++++-------- plugins/zns/zns.h | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/zns') diff --git a/plugins/zns/zns.c b/plugins/zns/zns.c index 56e53af..0b96346 100644 --- a/plugins/zns/zns.c +++ b/plugins/zns/zns.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later #include #include #include @@ -102,13 +103,12 @@ static int list(int argc, char **argv, struct command *cmd, nvme_root = nvme_scan(NULL); if (nvme_root) { err = print_zns_list(nvme_root); + nvme_free_tree(nvme_root); } else { fprintf(stderr, "Failed to scan nvme subsystems\n"); err = -errno; } - nvme_free_tree(nvme_root); - return err; } @@ -1018,9 +1018,9 @@ static int zone_append(int argc, char **argv, struct command *cmd, struct plugin const char *fua = "force unit access"; const char *prinfo = "protection information action and checks field"; const char *piremap = "protection information remap (for type 1 PI)"; - const char *ref_tag = "reference tag (for end to end PI)"; - const char *lbat = "logical block application tag (for end to end PI)"; - const char *lbatm = "logical block application tag mask (for end to end PI)"; + const char *ref_tag = "reference tag for end-to-end PI"; + const char *lbat = "logical block application tag for end-to-end PI"; + const char *lbatm = "logical block application tag mask for end-to-end PI"; const char *metadata_size = "size of metadata in bytes"; const char *data_size = "size of data in bytes"; const char *latency = "output latency statistics"; @@ -1044,7 +1044,7 @@ static int zone_append(int argc, char **argv, struct command *cmd, struct plugin bool limited_retry; bool fua; __u32 namespace_id; - __u32 ref_tag; + __u64 ref_tag; __u16 lbat; __u16 lbatm; __u8 prinfo; @@ -1063,7 +1063,7 @@ static int zone_append(int argc, char **argv, struct command *cmd, struct plugin OPT_FILE("metadata", 'M', &cfg.metadata, metadata), OPT_FLAG("limited-retry", 'l', &cfg.limited_retry, limited_retry), OPT_FLAG("force-unit-access", 'f', &cfg.fua, fua), - OPT_UINT("ref-tag", 'r', &cfg.ref_tag, ref_tag), + OPT_SUFFIX("ref-tag", 'r', &cfg.ref_tag, ref_tag), OPT_SHRT("app-tag-mask", 'm', &cfg.lbatm, lbatm), OPT_SHRT("app-tag", 'a', &cfg.lbat, lbat), OPT_BYTE("prinfo", 'p', &cfg.prinfo, prinfo), @@ -1184,7 +1184,7 @@ static int zone_append(int argc, char **argv, struct command *cmd, struct plugin .zslba = cfg.zslba, .nlb = nblocks, .control = control, - .ilbrt = cfg.ref_tag, + .ilbrt_u64 = cfg.ref_tag, .lbat = cfg.lbat, .lbatm = cfg.lbatm, .data_len = cfg.data_size, diff --git a/plugins/zns/zns.h b/plugins/zns/zns.h index 1bdd4d9..77bfdd6 100644 --- a/plugins/zns/zns.h +++ b/plugins/zns/zns.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #undef CMD_INC_FILE #define CMD_INC_FILE plugins/zns/zns -- cgit v1.2.3