From d97efa1ab7866ef8ae18aa73b87a36dc7d21c139 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Mon, 12 Aug 2019 19:39:31 +0000 Subject: [PATCH] MFC r350523, r350524: Add IOCTL to translate nvdX into nvmeY and NSID. While very useful by itself, it also makes `nvmecontrol` not depend on hardcoded device names parsing, that in its turn makes simple to take nvdX (and potentially any other) device names as arguments. Also added IOCTL bypass from nvdX to respective nvmeYnsZ makes them interchangeable for management purposes. --- sbin/nvmecontrol/Makefile | 3 +- sbin/nvmecontrol/devlist.c | 6 +-- sbin/nvmecontrol/firmware.c | 14 +++--- sbin/nvmecontrol/format.c | 20 +++------ sbin/nvmecontrol/identify.c | 74 +++++++++++++----------------- sbin/nvmecontrol/identify_ext.c | 1 + sbin/nvmecontrol/logpage.c | 19 ++++---- sbin/nvmecontrol/ns.c | 2 +- sbin/nvmecontrol/nsid.c | 80 +++++++++++++++++++++++++++++++++ sbin/nvmecontrol/nvmecontrol.8 | 8 +++- sbin/nvmecontrol/nvmecontrol.c | 38 ++++------------ sbin/nvmecontrol/nvmecontrol.h | 2 +- sys/dev/nvme/nvme.h | 9 ++++ sys/dev/nvme/nvme_ctrlr.c | 8 ++++ sys/dev/nvme/nvme_ns.c | 15 +++++++ 15 files changed, 189 insertions(+), 110 deletions(-) create mode 100644 sbin/nvmecontrol/nsid.c diff --git a/sbin/nvmecontrol/Makefile b/sbin/nvmecontrol/Makefile index 463a12f5a8c..a60238cee98 100644 --- a/sbin/nvmecontrol/Makefile +++ b/sbin/nvmecontrol/Makefile @@ -3,7 +3,8 @@ PACKAGE=runtime PROG= nvmecontrol SRCS= comnd.c nvmecontrol.c -SRCS+= devlist.c firmware.c format.c identify.c logpage.c ns.c perftest.c power.c reset.c +SRCS+= devlist.c firmware.c format.c identify.c logpage.c ns.c nsid.c +SRCS+= perftest.c power.c reset.c #SRCS+= passthru.c SRCS+= identify_ext.c nvme_util.c nc_util.c MAN= nvmecontrol.8 diff --git a/sbin/nvmecontrol/devlist.c b/sbin/nvmecontrol/devlist.c index 432e3d8ce90..560757f3ba7 100644 --- a/sbin/nvmecontrol/devlist.c +++ b/sbin/nvmecontrol/devlist.c @@ -107,11 +107,11 @@ devlist(const struct cmd *f, int argc, char *argv[]) printf("%6s: %s\n", name, mn); for (i = 0; i < cdata.nn; i++) { - sprintf(name, "%s%d%s%d", NVME_CTRLR_PREFIX, ctrlr, - NVME_NS_PREFIX, i+1); - read_namespace_data(fd, i+1, &nsdata); + read_namespace_data(fd, i + 1, &nsdata); if (nsdata.nsze == 0) continue; + sprintf(name, "%s%d%s%d", NVME_CTRLR_PREFIX, ctrlr, + NVME_NS_PREFIX, i + 1); printf(" %10s (%lldMB)\n", name, nsdata.nsze * diff --git a/sbin/nvmecontrol/firmware.c b/sbin/nvmecontrol/firmware.c index ca988ba68b5..f03c91011dc 100644 --- a/sbin/nvmecontrol/firmware.c +++ b/sbin/nvmecontrol/firmware.c @@ -224,7 +224,7 @@ firmware(const struct cmd *f, int argc, char *argv[]) int activate_action, reboot_required; char prompt[64]; void *buf = NULL; - int32_t size = 0; + int32_t size = 0, nsid; uint16_t oacs_fw; uint8_t fw_slot1_ro, fw_num_slots; struct nvme_controller_data cdata; @@ -253,10 +253,6 @@ firmware(const struct cmd *f, int argc, char *argv[]) arg_help(argc, argv, f); } - /* Check that a controller (and not a namespace) was specified. */ - if (strstr(opt.dev, NVME_NS_PREFIX) != NULL) - arg_help(argc, argv, f); - if (opt.activate && opt.fw_img == NULL && opt.slot == 0) { fprintf(stderr, "Slot number to activate not specified.\n"); @@ -264,6 +260,14 @@ firmware(const struct cmd *f, int argc, char *argv[]) } open_dev(opt.dev, &fd, 1, 1); + + /* Check that a controller (and not a namespace) was specified. */ + get_nsid(fd, NULL, &nsid); + if (nsid != 0) { + close(fd); + arg_help(argc, argv, f); + } + read_controller_data(fd, &cdata); oacs_fw = (cdata.oacs >> NVME_CTRLR_DATA_OACS_FIRMWARE_SHIFT) & diff --git a/sbin/nvmecontrol/format.c b/sbin/nvmecontrol/format.c index e48ffa5ae65..ea3035d7645 100644 --- a/sbin/nvmecontrol/format.c +++ b/sbin/nvmecontrol/format.c @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (C) 2018 Alexander Motin - * All rights reserved. + * Copyright (C) 2018-2019 Alexander Motin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -117,7 +116,7 @@ format(const struct cmd *f, int argc, char *argv[]) struct nvme_controller_data cd; struct nvme_namespace_data nsd; struct nvme_pt_command pt; - char path[64]; + char *path; const char *target; uint32_t nsid; int lbaf, ms, pi, pil, ses, fd; @@ -143,18 +142,9 @@ format(const struct cmd *f, int argc, char *argv[]) else ses = opt.ses; - /* - * Check if the specified device node exists before continuing. - * This is a cleaner check for cases where the correct controller - * is specified, but an invalid namespace on that controller. - */ open_dev(target, &fd, 1, 1); - - /* - * If device node contains "ns", we consider it a namespace, - * otherwise, consider it a controller. - */ - if (strstr(target, NVME_NS_PREFIX) == NULL) { + get_nsid(fd, &path, &nsid); + if (nsid == 0) { nsid = NVME_GLOBAL_NAMESPACE_TAG; } else { /* @@ -164,9 +154,9 @@ format(const struct cmd *f, int argc, char *argv[]) * string to get the controller substring and namespace ID. */ close(fd); - parse_ns_str(target, path, &nsid); open_dev(path, &fd, 1, 1); } + free(path); /* Check that controller can execute this command. */ read_controller_data(fd, &cd); diff --git a/sbin/nvmecontrol/identify.c b/sbin/nvmecontrol/identify.c index 39f9d05542b..09a9a51ca81 100644 --- a/sbin/nvmecontrol/identify.c +++ b/sbin/nvmecontrol/identify.c @@ -3,6 +3,7 @@ * * Copyright (C) 2012-2013 Intel Corporation * All rights reserved. + * Copyright (C) 2018-2019 Alexander Motin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -44,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include "nvmecontrol.h" #include "nvmecontrol_ext.h" +#define NONE 0xfffffffeu + static struct options { bool hex; bool verbose; @@ -53,7 +56,7 @@ static struct options { .hex = false, .verbose = false, .dev = NULL, - .nsid = 0, + .nsid = NONE, }; void @@ -170,12 +173,11 @@ print_namespace(struct nvme_namespace_data *nsdata) } static void -identify_ctrlr(const struct cmd *f, int argc, char *argv[]) +identify_ctrlr(int fd) { struct nvme_controller_data cdata; - int fd, hexlength; + int hexlength; - open_dev(opt.dev, &fd, 1, 1); read_controller_data(fd, &cdata); close(fd); @@ -189,41 +191,16 @@ identify_ctrlr(const struct cmd *f, int argc, char *argv[]) exit(0); } - if (opt.verbose) { - fprintf(stderr, "-v not currently supported without -x\n"); - arg_help(argc, argv, f); - } - nvme_print_controller(&cdata); exit(0); } static void -identify_ns(const struct cmd *f, int argc, char *argv[]) +identify_ns(int fd, uint32_t nsid) { struct nvme_namespace_data nsdata; - char path[64]; - int fd, hexlength; - uint32_t nsid; + int hexlength; - open_dev(opt.dev, &fd, 1, 1); - if (strstr(opt.dev, NVME_NS_PREFIX) != NULL) { - /* - * Now we know that provided device name is valid, that is - * good for error reporting if specified controller name is - * valid, but namespace ID is not. But we send IDENTIFY - * commands to the controller, not the namespace, since it - * is an admin cmd. The namespace ID will be specified in - * the IDENTIFY command itself. So parse the namespace's - * device node string to get the controller device substring - * and namespace ID. - */ - close(fd); - parse_ns_str(opt.dev, path, &nsid); - open_dev(path, &fd, 1, 1); - } else { - nsid = opt.nsid; - } read_namespace_data(fd, nsid, &nsdata); close(fd); @@ -237,11 +214,6 @@ identify_ns(const struct cmd *f, int argc, char *argv[]) exit(0); } - if (opt.verbose) { - fprintf(stderr, "-v not currently supported without -x\n"); - arg_help(argc, argv, f); - } - print_namespace(&nsdata); exit(0); } @@ -249,16 +221,32 @@ identify_ns(const struct cmd *f, int argc, char *argv[]) static void identify(const struct cmd *f, int argc, char *argv[]) { + char *path; + int fd; + uint32_t nsid; + arg_parse(argc, argv, f); - /* - * If device node contains "ns" or nsid is specified, we consider - * it a namespace request, otherwise, consider it a controller. - */ - if (strstr(opt.dev, NVME_NS_PREFIX) == NULL && opt.nsid == 0) - identify_ctrlr(f, argc, argv); + open_dev(opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + /* + * We got namespace device, but we need to send IDENTIFY + * commands to the controller, not the namespace, since it + * is an admin cmd. The namespace ID will be specified in + * the IDENTIFY command itself. + */ + close(fd); + open_dev(path, &fd, 1, 1); + } + free(path); + if (opt.nsid != NONE) + nsid = opt.nsid; + + if (nsid == 0) + identify_ctrlr(fd); else - identify_ns(f, argc, argv); + identify_ns(fd, nsid); } static const struct opts identify_opts[] = { diff --git a/sbin/nvmecontrol/identify_ext.c b/sbin/nvmecontrol/identify_ext.c index eeb64cc62d7..2c7dfd7e427 100644 --- a/sbin/nvmecontrol/identify_ext.c +++ b/sbin/nvmecontrol/identify_ext.c @@ -3,6 +3,7 @@ * * Copyright (C) 2012-2013 Intel Corporation * All rights reserved. + * Copyright (C) 2018-2019 Alexander Motin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c index a766a0bdaec..d2f3ae331f7 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -399,8 +399,7 @@ static void logpage(const struct cmd *f, int argc, char *argv[]) { int fd; - bool ns_specified; - char cname[64]; + char *path; uint32_t nsid, size; void *buf; const struct logpage_function *lpf; @@ -421,15 +420,15 @@ logpage(const struct cmd *f, int argc, char *argv[]) fprintf(stderr, "Missing page_id (-p).\n"); arg_help(argc, argv, f); } - if (strstr(opt.dev, NVME_NS_PREFIX) != NULL) { - ns_specified = true; - parse_ns_str(opt.dev, cname, &nsid); - open_dev(cname, &fd, 1, 1); - } else { - ns_specified = false; + open_dev(opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid == 0) { nsid = NVME_GLOBAL_NAMESPACE_TAG; - open_dev(opt.dev, &fd, 1, 1); + } else { + close(fd); + open_dev(path, &fd, 1, 1); } + free(path); read_controller_data(fd, &cdata); @@ -441,7 +440,7 @@ logpage(const struct cmd *f, int argc, char *argv[]) * supports the SMART/Health information log page on a per * namespace basis. */ - if (ns_specified) { + if (nsid != NVME_GLOBAL_NAMESPACE_TAG) { if (opt.page != NVME_LOG_HEALTH_INFORMATION) errx(1, "log page %d valid only at controller level", opt.page); diff --git a/sbin/nvmecontrol/ns.c b/sbin/nvmecontrol/ns.c index fdeb8d7b038..d71e4afdd00 100644 --- a/sbin/nvmecontrol/ns.c +++ b/sbin/nvmecontrol/ns.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2017 Netflix, Inc - * Copyright (C) 2018 Alexander Motin + * Copyright (C) 2018-2019 Alexander Motin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/sbin/nvmecontrol/nsid.c b/sbin/nvmecontrol/nsid.c new file mode 100644 index 00000000000..deec3021a12 --- /dev/null +++ b/sbin/nvmecontrol/nsid.c @@ -0,0 +1,80 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2019 Alexander Motin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include + +#include "nvmecontrol.h" +#include "comnd.h" + +/* Tables for command line parsing */ + +static cmd_fn_t gnsid; + +static struct nsid_options { + const char *dev; +} nsid_opt = { + .dev = NULL, +}; + +static const struct args nsid_args[] = { + { arg_string, &nsid_opt.dev, "namespace-id" }, + { arg_none, NULL, NULL }, +}; + +static struct cmd nsid_cmd = { + .name = "nsid", + .fn = gnsid, + .descr = "Get controller and NSID for namespace", + .ctx_size = sizeof(nsid_opt), + .opts = NULL, + .args = nsid_args, +}; + +CMD_COMMAND(nsid_cmd); + +static void +gnsid(const struct cmd *f, int argc, char *argv[]) +{ + char *path; + int fd; + uint32_t nsid; + + arg_parse(argc, argv, f); + + open_dev(nsid_opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + close(fd); + printf("%s\t%u\n", path, nsid); + free(path); +} diff --git a/sbin/nvmecontrol/nvmecontrol.8 b/sbin/nvmecontrol/nvmecontrol.8 index 9fb174bc5d9..b19826780a0 100644 --- a/sbin/nvmecontrol/nvmecontrol.8 +++ b/sbin/nvmecontrol/nvmecontrol.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2018 Alexander Motin +.\" Copyright (c) 2018-2019 Alexander Motin .\" Copyright (c) 2012 Intel Corporation .\" All rights reserved. .\" @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2019 +.Dd August 1, 2019 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -114,6 +114,10 @@ .Aq Fl n Ar nsid .Aq device id .Nm +.Ic nsid +.Aq device id +.Aq namespace id +.Nm .Ic firmware .Op Fl s Ar slot .Op Fl f Ar path_to_firmware diff --git a/sbin/nvmecontrol/nvmecontrol.c b/sbin/nvmecontrol/nvmecontrol.c index 1c2ff18b17d..91e42de0266 100644 --- a/sbin/nvmecontrol/nvmecontrol.c +++ b/sbin/nvmecontrol/nvmecontrol.c @@ -146,16 +146,6 @@ open_dev(const char *str, int *fd, int show_error, int exit_on_error) { char full_path[64]; - if (!strnstr(str, NVME_CTRLR_PREFIX, strlen(NVME_CTRLR_PREFIX))) { - if (show_error) - warnx("controller/namespace ids must begin with '%s'", - NVME_CTRLR_PREFIX); - if (exit_on_error) - exit(1); - else - return (EINVAL); - } - snprintf(full_path, sizeof(full_path), _PATH_DEV"%s", str); *fd = open(full_path, O_RDWR); if (*fd < 0) { @@ -171,26 +161,16 @@ open_dev(const char *str, int *fd, int show_error, int exit_on_error) } void -parse_ns_str(const char *ns_str, char *ctrlr_str, uint32_t *nsid) +get_nsid(int fd, char **ctrlr_str, uint32_t *nsid) { - char *nsloc; - - /* - * Pull the namespace id from the string. +2 skips past the "ns" part - * of the string. Don't search past 10 characters into the string, - * otherwise we know it is malformed. - */ - nsloc = strnstr(ns_str, NVME_NS_PREFIX, 10); - if (nsloc != NULL) - *nsid = strtol(nsloc + 2, NULL, 10); - if (nsloc == NULL || (*nsid == 0 && errno != 0)) - errx(1, "invalid namespace ID '%s'", ns_str); - - /* - * The controller string will include only the nvmX part of the - * nvmeXnsY string. - */ - snprintf(ctrlr_str, nsloc - ns_str + 1, "%s", ns_str); + struct nvme_get_nsid gnsid; + + if (ioctl(fd, NVME_GET_NSID, &gnsid) < 0) + err(1, "NVME_GET_NSID ioctl failed"); + if (ctrlr_str != NULL) + *ctrlr_str = strndup(gnsid.cdev, sizeof(gnsid.cdev)); + if (nsid != NULL) + *nsid = gnsid.nsid; } int diff --git a/sbin/nvmecontrol/nvmecontrol.h b/sbin/nvmecontrol/nvmecontrol.h index 27a20557773..2041d34fc98 100644 --- a/sbin/nvmecontrol/nvmecontrol.h +++ b/sbin/nvmecontrol/nvmecontrol.h @@ -69,7 +69,7 @@ void logpage_register(struct logpage_function *p); #define NVME_NS_PREFIX "ns" int open_dev(const char *str, int *fd, int show_error, int exit_on_error); -void parse_ns_str(const char *ns_str, char *ctrlr_str, uint32_t *nsid); +void get_nsid(int fd, char **ctrlr_str, uint32_t *nsid); void read_controller_data(int fd, struct nvme_controller_data *cdata); void read_namespace_data(int fd, uint32_t nsid, struct nvme_namespace_data *nsdata); void print_hex(void *data, uint32_t length); diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 785a7031072..2dfd5e481ee 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -40,6 +40,7 @@ #define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_command) #define NVME_RESET_CONTROLLER _IO('n', 1) +#define NVME_GET_NSID _IOR('n', 2, struct nvme_get_nsid) #define NVME_IO_TEST _IOWR('n', 100, struct nvme_io_test) #define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test) @@ -1332,6 +1333,11 @@ struct nvme_pt_command { struct mtx * driver_lock; }; +struct nvme_get_nsid { + char cdev[SPECNAMELEN + 1]; + uint32_t nsid; +}; + #define nvme_completion_is_error(cpl) \ (NVME_STATUS_GET_SC((cpl)->status) != 0 || NVME_STATUS_GET_SCT((cpl)->status) != 0) @@ -1340,6 +1346,7 @@ void nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, int srclen); #ifdef _KERNEL struct bio; +struct thread; struct nvme_namespace; struct nvme_controller; @@ -1429,6 +1436,8 @@ uint32_t nvme_ns_get_stripesize(struct nvme_namespace *ns); int nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp, nvme_cb_fn_t cb_fn); +int nvme_ns_ioctl_process(struct nvme_namespace *ns, u_long cmd, + caddr_t arg, int flag, struct thread *td); /* * Command building helper functions -- shared with CAM diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 78b734e29b4..ddc276b2b82 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1126,6 +1126,14 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, pt = (struct nvme_pt_command *)arg; return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, le32toh(pt->cmd.nsid), 1 /* is_user_buffer */, 1 /* is_admin_cmd */)); + case NVME_GET_NSID: + { + struct nvme_get_nsid *gnsid = (struct nvme_get_nsid *)arg; + strncpy(gnsid->cdev, device_get_nameunit(ctrlr->dev), + sizeof(gnsid->cdev)); + gnsid->nsid = 0; + break; + } default: return (ENOTTY); } diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index 55e8931cfd1..df38810dc66 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -82,6 +82,14 @@ nvme_ns_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, pt = (struct nvme_pt_command *)arg; return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, ns->id, 1 /* is_user_buffer */, 0 /* is_admin_cmd */)); + case NVME_GET_NSID: + { + struct nvme_get_nsid *gnsid = (struct nvme_get_nsid *)arg; + strncpy(gnsid->cdev, device_get_nameunit(ctrlr->dev), + sizeof(gnsid->cdev)); + gnsid->nsid = ns->id; + break; + } case DIOCGMEDIASIZE: *(off_t *)arg = (off_t)nvme_ns_get_size(ns); break; @@ -483,6 +491,13 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp, return (err); } +int +nvme_ns_ioctl_process(struct nvme_namespace *ns, u_long cmd, caddr_t arg, + int flag, struct thread *td) +{ + return (nvme_ns_ioctl(ns->cdev, cmd, arg, flag, td)); +} + int nvme_ns_construct(struct nvme_namespace *ns, uint32_t id, struct nvme_controller *ctrlr) -- 2.45.0