From d975eb29d0fcd0e2d13f42033a2b896af18d189c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 16 Feb 2025 12:11:43 +0100 Subject: [PATCH] Merging upstream version 1.15. Signed-off-by: Daniel Baumann --- Documentation/nvme-admin-passthru.1 | 14 +- Documentation/nvme-admin-passthru.html | 26 +- Documentation/nvme-admin-passthru.txt | 5 + Documentation/nvme-capacity-mgmt.1 | 71 + ...e-list-ns.html => nvme-capacity-mgmt.html} | 64 +- Documentation/nvme-capacity-mgmt.txt | 54 + Documentation/nvme-compare.1 | 14 +- Documentation/nvme-compare.html | 27 +- Documentation/nvme-compare.txt | 6 + Documentation/nvme-connect-all.txt | 10 +- Documentation/nvme-connect.txt | 17 +- Documentation/nvme-discover.txt | 20 +- Documentation/nvme-get-feature.1 | 26 +- Documentation/nvme-get-feature.html | 33 +- Documentation/nvme-get-feature.txt | 9 + Documentation/nvme-get-lba-status.1 | 134 ++ ...-get-log.html => nvme-get-lba-status.html} | 142 +- Documentation/nvme-get-lba-status.txt | 82 + Documentation/nvme-get-log.1 | 40 +- Documentation/nvme-get-log.html | 53 +- Documentation/nvme-get-log.txt | 30 +- .../{nvme-id-iocs.1 => nvme-id-domain.1} | 50 +- ...{nvme-id-iocs.html => nvme-id-domain.html} | 50 +- Documentation/nvme-id-domain.txt | 40 + Documentation/nvme-id-iocs.1 | 43 +- Documentation/nvme-id-iocs.html | 38 +- Documentation/nvme-id-iocs.txt | 17 +- Documentation/nvme-io-passthru.1 | 14 +- Documentation/nvme-io-passthru.html | 21 +- Documentation/nvme-io-passthru.txt | 5 + Documentation/nvme-list-ctrl.1 | 18 +- Documentation/nvme-list-ctrl.html | 28 +- Documentation/nvme-list-ctrl.txt | 7 +- Documentation/nvme-list-ns.1 | 59 +- Documentation/nvme-list-ns.html | 37 +- Documentation/nvme-list-ns.txt | 19 +- Documentation/nvme-micron-smart-add-log.1 | 87 + ...cs.html => nvme-micron-smart-add-log.html} | 1632 ++++++++--------- Documentation/nvme-micron-smart-add-log.txt | 54 + Documentation/nvme-primary-ctrl-caps.1 | 104 ++ ...-iocs.html => nvme-primary-ctrl-caps.html} | 53 +- Documentation/nvme-primary-ctrl-caps.txt | 53 + Documentation/nvme-read.1 | 14 +- Documentation/nvme-read.html | 17 +- Documentation/nvme-read.txt | 6 + Documentation/nvme-resv-register.1 | 2 +- Documentation/nvme-resv-register.html | 2 +- Documentation/nvme-resv-register.txt | 2 +- Documentation/nvme-set-feature.1 | 16 +- Documentation/nvme-set-feature.html | 27 +- Documentation/nvme-set-feature.txt | 7 + .../{nvme-write-zeroes.1 => nvme-verify.1} | 86 +- ...vme-write-zeroes.html => nvme-verify.html} | 125 +- ...{nvme-write-zeroes.txt => nvme-verify.txt} | 66 +- Documentation/nvme-write-zeroes.1 | 34 +- Documentation/nvme-write-zeroes.html | 49 +- Documentation/nvme-write-zeroes.txt | 13 +- Documentation/nvme-write.1 | 14 +- Documentation/nvme-write.html | 17 +- Documentation/nvme-write.txt | 6 + Documentation/nvme-zns-close-zone.1 | 12 +- Documentation/nvme-zns-finish-zone.1 | 12 +- Documentation/nvme-zns-offline-zone.1 | 12 +- Documentation/nvme-zns-open-zone.1 | 12 +- Documentation/nvme-zns-reset-zone.1 | 10 +- Documentation/nvme-zns-set-zone-desc.1 | 10 +- Documentation/nvme-zns-zone-mgmt-send.1 | 16 +- NVME-VERSION-GEN | 2 +- cmd_handler.h | 8 +- completions/_nvme | 46 +- completions/bash-nvme-completion.sh | 1242 ++++++++++++- etc/discovery.conf.in | 2 +- fabrics.c | 145 +- fabrics.h | 2 + linux/nvme.h | 133 +- linux/nvme_ioctl.h | 16 - nvme-builtin.h | 2 + nvme-ioctl.c | 169 +- nvme-ioctl.h | 30 +- nvme-print.c | 642 +++++-- nvme-print.h | 7 +- nvme-rpmb.c | 2 +- nvme-topology.c | 50 +- nvme.c | 1069 +++++++---- nvme.h | 9 + .../systemd/nvmf-autoconnect.service | 3 +- plugin.c | 2 +- plugin.h | 1 + plugins/amzn/amzn-nvme.h | 2 +- plugins/dera/dera-nvme.h | 2 +- plugins/huawei/huawei-nvme.h | 2 +- plugins/intel/intel-nvme.c | 10 +- plugins/intel/intel-nvme.h | 2 +- plugins/lnvm/lnvm-nvme.h | 2 +- plugins/memblaze/memblaze-nvme.c | 12 +- plugins/memblaze/memblaze-nvme.h | 2 +- plugins/micron/micron-nvme.c | 473 +++-- plugins/micron/micron-nvme.h | 5 +- plugins/netapp/netapp-nvme.h | 2 +- plugins/nvidia/nvidia-nvme.h | 2 +- plugins/scaleflux/sfx-nvme.h | 2 +- plugins/seagate/seagate-nvme.c | 2 +- plugins/seagate/seagate-nvme.h | 2 +- plugins/shannon/shannon-nvme.c | 4 +- plugins/shannon/shannon-nvme.h | 2 +- plugins/toshiba/toshiba-nvme.c | 2 +- plugins/toshiba/toshiba-nvme.h | 2 +- plugins/transcend/transcend-nvme.h | 2 +- plugins/virtium/virtium-nvme.h | 2 +- plugins/wdc/wdc-nvme.c | 209 ++- plugins/wdc/wdc-nvme.h | 3 +- plugins/wdc/wdc-utils.c | 4 + plugins/ymtc/ymtc-nvme.h | 2 +- plugins/zns/zns.c | 66 +- plugins/zns/zns.h | 2 +- scripts/gen-hostnqn.sh | 18 - 116 files changed, 6031 insertions(+), 2284 deletions(-) create mode 100644 Documentation/nvme-capacity-mgmt.1 copy Documentation/{nvme-list-ns.html => nvme-capacity-mgmt.html} (87%) create mode 100644 Documentation/nvme-capacity-mgmt.txt create mode 100644 Documentation/nvme-get-lba-status.1 copy Documentation/{nvme-get-log.html => nvme-get-lba-status.html} (81%) create mode 100644 Documentation/nvme-get-lba-status.txt copy Documentation/{nvme-id-iocs.1 => nvme-id-domain.1} (60%) copy Documentation/{nvme-id-iocs.html => nvme-id-domain.html} (90%) create mode 100644 Documentation/nvme-id-domain.txt create mode 100644 Documentation/nvme-micron-smart-add-log.1 copy Documentation/{nvme-id-iocs.html => nvme-micron-smart-add-log.html} (89%) create mode 100644 Documentation/nvme-micron-smart-add-log.txt create mode 100644 Documentation/nvme-primary-ctrl-caps.1 copy Documentation/{nvme-id-iocs.html => nvme-primary-ctrl-caps.html} (87%) create mode 100644 Documentation/nvme-primary-ctrl-caps.txt copy Documentation/{nvme-write-zeroes.1 => nvme-verify.1} (62%) copy Documentation/{nvme-write-zeroes.html => nvme-verify.html} (87%) copy Documentation/{nvme-write-zeroes.txt => nvme-verify.txt} (51%) diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1 index 286709f..8cf0095 100644 --- a/Documentation/nvme-admin-passthru.1 +++ b/Documentation/nvme-admin-passthru.1 @@ -1,13 +1,13 @@ '\" t .\" Title: nvme-admin-passthru -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 10/20/2020 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/04/2021 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ADMIN\-PASSTHR" "1" "10/20/2020" "NVMe" "NVMe Manual" +.TH "NVME\-ADMIN\-PASSTHR" "1" "06/04/2021" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -46,6 +46,7 @@ nvme-admin-passthru \- Submit an arbitrary admin command, return results [\-\-dry\-run | \-d] [\-\-raw\-binary | \-b] [\-\-prefill= | \-p ] + [\-\-latency | \-T] .fi .SH "DESCRIPTION" .sp @@ -123,6 +124,11 @@ Print the raw returned buffer to stdout if the command returns a structure\&. .RS 4 Prefill the buffer with a predetermined byte value\&. Defaults to 0\&. This may be useful if the data you are writing is shorter than the required buffer, and you need to pad it with a known value\&. It may also be useful if you need to confirm if a device is overwriting a buffer for a data\-in command\&. .RE +.PP +\-T, \-\-latency +.RS 4 +Print out the latency the IOCTL took (in us)\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-admin-passthru.html b/Documentation/nvme-admin-passthru.html index 4a113ba..63a7a10 100644 --- a/Documentation/nvme-admin-passthru.html +++ b/Documentation/nvme-admin-passthru.html @@ -1,9 +1,10 @@ + - + nvme-admin-passthru(1) - - - - -
-
-

SYNOPSIS

-
-
-
nvme id-iocs <device> [--controller-id=<cntid> | -c <cntid>]
-
-
-
-
-
-

DESCRIPTION

-
-

For the NVMe device given, send an identify command and return the Identify I/O -Command Set data structure.

-

The <device> parameter is mandatory and may be either the NVMe character -device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).

-
-
-
-

OPTIONS

-
-
-
--c <cntid> -
-
---controller-id=<cntid> -
-
-

- Retrieve the identify I/O Command set data structure for the given - cntid. If this value is not given, cntid will be 0xffff. -

-
-
-
-
-
-

EXAMPLES

-
-
    -
  • -

    -Have the program interpret the returned buffer and display the known -fields in a human readable format: -

    -
    -
    -
    # nvme id-iocs /dev/nvme0
    -
    -
  • -
-
-
-
-

NVME

-
-

Part of the nvme-user suite

-
-
-
-

- - - + + + + + + +nvme-micron-smart-add-log(1) + + + + + +
+
+

SYNOPSIS

+
+
+
nvme micron vs-smart-add-log <device>  -f <json|normal>
+
+
+
+
+
+

DESCRIPTION

+
+

This command prints NAND information (Total bytes written, Bad block count and +Erase failures etc) for the given micron device if its of 2200 model controller. +For OCP complaint controllers this command print extended SMART health data +along with NAND information (if available)

+

The <device> parameter is mandatory and may be either the NVMe +character device (ex: /dev/nvme0), or a namespace block device (ex: +/dev/nvme0n1).

+

The -f option controls the displayed output data format based on the option +value. If the option value is json (which is enabled by default), output data +is printed in JSON format. If option value is normal the output is displayed +in non-JSON format.

+

This will only work on Micron devices devices of model numbers 54XX and OCP +complaint controllers. Support for new devices may be added subsequently.

+
+
+
+

OPTIONS

+
+

-f <json|normal> controls the format of displayed output.

+
+
+
+

EXAMPLES

+
+
    +
  • +

    +Retrieve NAND/extended SMART data and display in json format +

    +
    +
    +
    # nvme micron vs-nand-stats /dev/nvme0
    +
    +* Retrieve NAND/extended SMART data and display in non-json format
    ++
    +
    +
  • +
+

# nvme micron vs-nand-stats /dev/nvme0 -f normal

+
+
+
NVME
+
+

Part of the nvme-user suite

+
+
+
+

+ + + diff --git a/Documentation/nvme-micron-smart-add-log.txt b/Documentation/nvme-micron-smart-add-log.txt new file mode 100644 index 0000000..1fd74ba --- /dev/null +++ b/Documentation/nvme-micron-smart-add-log.txt @@ -0,0 +1,54 @@ +nvme-micron-smart-add-log(1) +============================ + +NAME +---- +nvme-micron-smart-add-log - Retrieves NAND statistics (2200 model drives) +or Extended SMART information (OCP complaint models) of given micron device + +SYNOPSIS +-------- +[verse] +'nvme micron vs-smart-add-log' -f + +DESCRIPTION +----------- +This command prints NAND information (Total bytes written, Bad block count and +Erase failures etc) for the given micron device if its of 2200 model controller. +For OCP complaint controllers this command print extended SMART health data +along with NAND information (if available) + +The parameter is mandatory and may be either the NVMe +character device (ex: /dev/nvme0), or a namespace block device (ex: +/dev/nvme0n1). + +The '-f' option controls the displayed output data format based on the option +value. If the option value is 'json' (which is enabled by default), output data +is printed in JSON format. If option value is 'normal' the output is displayed +in non-JSON format. + +This will only work on Micron devices devices of model numbers 54XX and OCP +complaint controllers. Support for new devices may be added subsequently. + +OPTIONS +------- +-f controls the format of displayed output. + + +EXAMPLES +-------- +* Retrieve NAND/extended SMART data and display in json format ++ +------------ +# nvme micron vs-nand-stats /dev/nvme0 + +* Retrieve NAND/extended SMART data and display in non-json format ++ +------------ +# nvme micron vs-nand-stats /dev/nvme0 -f normal + +------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-primary-ctrl-caps.1 b/Documentation/nvme-primary-ctrl-caps.1 new file mode 100644 index 0000000..cdf7529 --- /dev/null +++ b/Documentation/nvme-primary-ctrl-caps.1 @@ -0,0 +1,104 @@ +'\" t +.\" Title: nvme-primary-ctrl-caps +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/11/2021 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-PRIMARY\-CTRL\" "1" "05/11/2021" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-primary-ctrl-caps \- Send identify Primary Controller Caps, return result and structure +.SH "SYNOPSIS" +.sp +.nf +\fInvme primary\-ctrl\-caps\fR [\-o | \-\-output\-format=] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, sends an identify primary Controller caps command and provides the result and returned structure\&. +.sp +The parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1)\&. +.sp +On success, the structure may be returned in one of several ways depending on the option flags; the structure may be parsed by the program or the raw buffer may be printed to stdout\&. +.SH "OPTIONS" +.PP +\-o , \-\-output\-format= +.RS 4 +Set the reporting format to +\fInormal\fR, +\fIjson\fR, or +\fIbinary\fR\&. Only one output format can be used at a time\&. +.RE +.PP +\-H, \-\-human\-readable +.RS 4 +This option will parse and format many of the bit fields into human\-readable formats\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Get Primary Ctrl Caps of the device in default format +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme primary\-ctrl\-caps /dev/nvme0 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program interpret the returned buffer and display the known fields in a human readable format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme primary\-ctrl\-caps /dev/nvme0 \-\-human\-readbale +# nvme primary\-ctrl\-caps /dev/nvme0 \-H +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite diff --git a/Documentation/nvme-id-iocs.html b/Documentation/nvme-primary-ctrl-caps.html similarity index 87% copy from Documentation/nvme-id-iocs.html copy to Documentation/nvme-primary-ctrl-caps.html index 6bc983f..3cae1a2 100644 --- a/Documentation/nvme-id-iocs.html +++ b/Documentation/nvme-primary-ctrl-caps.html @@ -5,7 +5,7 @@ -nvme-id-iocs(1) +nvme-primary-ctrl-caps(1)