From 2066c5b305426e17e4ba908f14493fc50a57434e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 16 Feb 2025 11:30:13 +0100 Subject: [PATCH] Adding upstream version 1.14. Signed-off-by: Daniel Baumann --- .github/workflows/c-cpp.yml | 18 + .gitignore | 3 + Documentation/cmds-main.txt | 35 +- Documentation/nvme-admin-passthru.1 | 4 +- Documentation/nvme-ana-log.1 | 4 +- Documentation/nvme-attach-ns.1 | 4 +- Documentation/nvme-changed-ns-list-log.1 | 4 +- Documentation/nvme-compare.1 | 4 +- Documentation/nvme-connect-all.1 | 14 +- Documentation/nvme-connect-all.html | 10 +- Documentation/nvme-connect-all.txt | 5 +- Documentation/nvme-connect.1 | 10 +- Documentation/nvme-connect.html | 8 +- Documentation/nvme-connect.txt | 1 + Documentation/nvme-copy.1 | 141 + ...{nvme-resv-release.html => nvme-copy.html} | 280 +- Documentation/nvme-copy.txt | 111 + Documentation/nvme-create-ns.1 | 10 +- Documentation/nvme-create-ns.html | 27 +- Documentation/nvme-create-ns.txt | 6 + Documentation/nvme-delete-ns.1 | 4 +- Documentation/nvme-dera-stat.1 | 4 +- Documentation/nvme-detach-ns.1 | 4 +- Documentation/nvme-device-self-test.1 | 4 +- Documentation/nvme-dir-receive.1 | 4 +- Documentation/nvme-dir-send.1 | 4 +- Documentation/nvme-disconnect-all.1 | 4 +- Documentation/nvme-disconnect.1 | 4 +- Documentation/nvme-discover.1 | 10 +- Documentation/nvme-discover.html | 8 +- Documentation/nvme-discover.txt | 13 + Documentation/nvme-dsm.1 | 4 +- Documentation/nvme-effects-log.1 | 4 +- ...e-log.1 => nvme-endurance-event-agg-log.1} | 32 +- ...html => nvme-endurance-event-agg-log.html} | 45 +- .../nvme-endurance-event-agg-log.txt | 66 + Documentation/nvme-endurance-log.1 | 4 +- Documentation/nvme-endurance-log.html | 2 +- Documentation/nvme-error-log.1 | 4 +- Documentation/nvme-flush.1 | 4 +- Documentation/nvme-format.1 | 4 +- Documentation/nvme-fw-commit.1 | 4 +- Documentation/nvme-fw-download.1 | 4 +- Documentation/nvme-fw-log.1 | 4 +- Documentation/nvme-gen-hostnqn.1 | 4 +- Documentation/nvme-get-feature.1 | 4 +- Documentation/nvme-get-log.1 | 4 +- Documentation/nvme-get-ns-id.1 | 4 +- Documentation/nvme-get-ns-id.html | 14 +- Documentation/nvme-get-property.1 | 4 +- Documentation/nvme-help.1 | 4 +- Documentation/nvme-huawei-id-ctrl.1 | 4 +- Documentation/nvme-huawei-list.1 | 4 +- Documentation/nvme-id-ctrl.1 | 4 +- ...transcend-healthvalue.1 => nvme-id-iocs.1} | 25 +- .../{nvme-list-ns.html => nvme-id-iocs.html} | 60 +- Documentation/nvme-id-iocs.txt | 39 + Documentation/nvme-id-ns.1 | 4 +- Documentation/nvme-id-nvmset.1 | 4 +- Documentation/nvme-intel-id-ctrl.1 | 4 +- Documentation/nvme-intel-internal-log.1 | 4 +- Documentation/nvme-intel-lat-stats.1 | 4 +- Documentation/nvme-intel-market-name.1 | 4 +- Documentation/nvme-intel-smart-log-add.1 | 4 +- Documentation/nvme-intel-temp-stats.1 | 4 +- Documentation/nvme-intel-temp-stats.html | 14 +- Documentation/nvme-io-passthru.1 | 4 +- .../{nvme-fw-log.1 => nvme-lba-status-log.1} | 37 +- ...ance-log.html => nvme-lba-status-log.html} | 51 +- Documentation/nvme-lba-status-log.txt | 54 + Documentation/nvme-list-ctrl.1 | 4 +- Documentation/nvme-list-ns.1 | 10 +- Documentation/nvme-list-ns.html | 20 +- Documentation/nvme-list-ns.txt | 6 + Documentation/nvme-list-subsys.1 | 4 +- Documentation/nvme-list.1 | 4 +- Documentation/nvme-lnvm-create.1 | 4 +- Documentation/nvme-lnvm-diag-bbtbl.1 | 4 +- Documentation/nvme-lnvm-diag-set-bbtbl.1 | 4 +- Documentation/nvme-lnvm-factory.1 | 4 +- Documentation/nvme-lnvm-id-ns.1 | 4 +- Documentation/nvme-lnvm-info.1 | 4 +- Documentation/nvme-lnvm-init.1 | 4 +- Documentation/nvme-lnvm-list.1 | 4 +- Documentation/nvme-lnvm-remove.1 | 4 +- ...lock.1 => nvme-micron-clear-pcie-errors.1} | 20 +- ...tml => nvme-micron-clear-pcie-errors.html} | 48 +- .../nvme-micron-clear-pcie-errors.txt | 39 + ...rket-name.1 => nvme-micron-internal-log.1} | 22 +- ...ats.html => nvme-micron-internal-log.html} | 65 +- Documentation/nvme-micron-internal-log.txt | 43 + ...nd-badblock.1 => nvme-micron-nand-stats.1} | 20 +- ...ns-id.html => nvme-micron-nand-stats.html} | 49 +- Documentation/nvme-micron-nand-stats.txt | 40 + ...nd-badblock.1 => nvme-micron-pcie-stats.1} | 20 +- ...ns-id.html => nvme-micron-pcie-stats.html} | 49 +- Documentation/nvme-micron-pcie-stats.txt | 40 + ...log.1 => nvme-micron-selective-download.1} | 53 +- ...ml => nvme-micron-selective-download.html} | 99 +- .../nvme-micron-selective-download.txt | 63 + ...lock.1 => nvme-micron-temperature-stats.1} | 20 +- ...tml => nvme-micron-temperature-stats.html} | 49 +- .../nvme-micron-temperature-stats.txt | 40 + Documentation/nvme-netapp-ontapdevices.1 | 4 +- Documentation/nvme-netapp-smdevices.1 | 4 +- Documentation/nvme-ns-descs.1 | 4 +- Documentation/nvme-ns-rescan.1 | 4 +- Documentation/nvme-ns-rescan.html | 1256 ++++--- .../{nvme-fw-log.1 => nvme-nvm-id-ctrl.1} | 36 +- ...durance-log.html => nvme-nvm-id-ctrl.html} | 45 +- Documentation/nvme-nvm-id-ctrl.txt | 49 + Documentation/nvme-persistent-event-log.1 | 118 + ...og.html => nvme-persistent-event-log.html} | 75 +- Documentation/nvme-persistent-event-log.txt | 76 + ...rt-log.1 => nvme-pred-lat-event-agg-log.1} | 39 +- ....html => nvme-pred-lat-event-agg-log.html} | 69 +- Documentation/nvme-pred-lat-event-agg-log.txt | 72 + ...smart-log.1 => nvme-predictable-lat-log.1} | 32 +- ...log.html => nvme-predictable-lat-log.html} | 52 +- Documentation/nvme-predictable-lat-log.txt | 66 + Documentation/nvme-read.1 | 4 +- Documentation/nvme-reset.1 | 4 +- Documentation/nvme-resv-acquire.1 | 6 +- Documentation/nvme-resv-acquire.html | 2 +- Documentation/nvme-resv-acquire.txt | 2 +- .../{nvme-fw-log.1 => nvme-resv-notif-log.1} | 34 +- ...ance-log.html => nvme-resv-notif-log.html} | 44 +- Documentation/nvme-resv-notif-log.txt | 51 + Documentation/nvme-resv-register.1 | 4 +- Documentation/nvme-resv-release.1 | 6 +- Documentation/nvme-resv-release.html | 2 +- Documentation/nvme-resv-release.txt | 2 +- Documentation/nvme-resv-report.1 | 4 +- Documentation/nvme-resv-report.html | 7 +- Documentation/nvme-rpmb.1 | 326 ++ ...dc-vs-internal-log.html => nvme-rpmb.html} | 209 +- Documentation/nvme-rpmb.txt | 150 + Documentation/nvme-sanitize-log.1 | 15 +- Documentation/nvme-sanitize-log.html | 15 +- Documentation/nvme-sanitize-log.txt | 6 +- Documentation/nvme-sanitize.1 | 4 +- Documentation/nvme-security-recv.1 | 4 +- Documentation/nvme-security-send.1 | 4 +- Documentation/nvme-self-test-log.1 | 16 +- Documentation/nvme-self-test-log.html | 30 +- Documentation/nvme-self-test-log.txt | 9 +- Documentation/nvme-set-feature.1 | 4 +- Documentation/nvme-set-property.1 | 4 +- Documentation/nvme-show-hostnqn.1 | 4 +- Documentation/nvme-show-regs.1 | 4 +- Documentation/nvme-smart-log.1 | 4 +- Documentation/nvme-smart-log.html | 14 +- Documentation/nvme-subsystem-reset.1 | 4 +- Documentation/nvme-telemetry-log.1 | 4 +- ...me-toshiba-clear-pcie-correctable-errors.1 | 4 +- Documentation/nvme-toshiba-vs-internal-log.1 | 4 +- Documentation/nvme-toshiba-vs-smart-add-log.1 | 4 +- Documentation/nvme-transcend-badblock.1 | 4 +- Documentation/nvme-transcend-healthvalue.1 | 4 +- .../nvme-virtium-save-smart-to-vtview-log.1 | 4 +- Documentation/nvme-virtium-show-identify.1 | 4 +- Documentation/nvme-wdc-cap-diag.1 | 4 +- ...sconnect-all.1 => nvme-wdc-capabilities.1} | 25 +- ...-ns-id.html => nvme-wdc-capabilities.html} | 39 +- Documentation/nvme-wdc-capabilities.txt | 32 + Documentation/nvme-wdc-clear-assert-dump.1 | 4 +- .../nvme-wdc-clear-fw-activate-history.1 | 4 +- .../nvme-wdc-clear-pcie-correctable-errors.1 | 4 +- ....1 => nvme-wdc-cloud-SSD-plugin-version.1} | 29 +- ...=> nvme-wdc-cloud-SSD-plugin-version.html} | 32 +- .../nvme-wdc-cloud-SSD-plugin-version.txt | 33 + Documentation/nvme-wdc-drive-essentials.1 | 4 +- Documentation/nvme-wdc-drive-log.1 | 4 +- Documentation/nvme-wdc-drive-resize.1 | 4 +- ...wdc-drive-log.1 => nvme-wdc-enc-get-log.1} | 56 +- ...nce-log.html => nvme-wdc-enc-get-log.html} | 50 +- Documentation/nvme-wdc-enc-get-log.txt | 54 + Documentation/nvme-wdc-get-crash-dump.1 | 4 +- Documentation/nvme-wdc-get-drive-status.1 | 4 +- Documentation/nvme-wdc-get-pfail-dump.1 | 4 +- Documentation/nvme-wdc-id-ctrl.1 | 4 +- Documentation/nvme-wdc-log-page-directory.1 | 4 +- Documentation/nvme-wdc-namespace-resize.1 | 4 +- Documentation/nvme-wdc-purge-monitor.1 | 4 +- Documentation/nvme-wdc-purge.1 | 4 +- Documentation/nvme-wdc-vs-drive-info.1 | 4 +- .../nvme-wdc-vs-error-reason-identifier.1 | 4 +- .../nvme-wdc-vs-fw-activate-history.1 | 4 +- Documentation/nvme-wdc-vs-internal-log.1 | 6 +- Documentation/nvme-wdc-vs-internal-log.html | 8 +- Documentation/nvme-wdc-vs-internal-log.txt | 30 +- Documentation/nvme-wdc-vs-nand-stats.1 | 4 +- Documentation/nvme-wdc-vs-nand-stats.html | 12 +- Documentation/nvme-wdc-vs-smart-add-log.1 | 423 +-- Documentation/nvme-wdc-vs-smart-add-log.html | 335 +- Documentation/nvme-wdc-vs-smart-add-log.txt | 226 +- .../nvme-wdc-vs-telemetry-controller-option.1 | 4 +- ...itor.1 => nvme-wdc-vs-temperature-stats.1} | 105 +- ...tml => nvme-wdc-vs-temperature-stats.html} | 128 +- .../nvme-wdc-vs-temperature-stats.txt | 78 + Documentation/nvme-write-uncor.1 | 4 +- Documentation/nvme-write-zeroes.1 | 4 +- Documentation/nvme-write.1 | 4 +- ...-fw-log.1 => nvme-zns-changed-zone-list.1} | 39 +- ...g.html => nvme-zns-changed-zone-list.html} | 57 +- Documentation/nvme-zns-changed-zone-list.txt | 54 + ...c-drive-resize.1 => nvme-zns-close-zone.1} | 38 +- ...-list-ns.html => nvme-zns-close-zone.html} | 68 +- Documentation/nvme-zns-close-zone.txt | 49 + ...-drive-resize.1 => nvme-zns-finish-zone.1} | 38 +- ...nce-log.html => nvme-zns-finish-zone.html} | 65 +- Documentation/nvme-zns-finish-zone.txt | 50 + .../{nvme-fw-log.1 => nvme-zns-id-ctrl.1} | 32 +- ...durance-log.html => nvme-zns-id-ctrl.html} | 45 +- Documentation/nvme-zns-id-ctrl.txt | 50 + .../{nvme-fw-log.1 => nvme-zns-id-ns.1} | 38 +- ...endurance-log.html => nvme-zns-id-ns.html} | 55 +- Documentation/nvme-zns-id-ns.txt | 62 + ...drive-resize.1 => nvme-zns-offline-zone.1} | 38 +- ...ce-log.html => nvme-zns-offline-zone.html} | 64 +- Documentation/nvme-zns-offline-zone.txt | 49 + ...dc-drive-resize.1 => nvme-zns-open-zone.1} | 38 +- ...e-list-ns.html => nvme-zns-open-zone.html} | 68 +- Documentation/nvme-zns-open-zone.txt | 49 + Documentation/nvme-zns-report-zones.1 | 198 + ...elease.html => nvme-zns-report-zones.html} | 211 +- Documentation/nvme-zns-report-zones.txt | 102 + ...c-drive-resize.1 => nvme-zns-reset-zone.1} | 38 +- ...ance-log.html => nvme-zns-reset-zone.html} | 65 +- Documentation/nvme-zns-reset-zone.txt | 50 + ...g-set-bbtbl.1 => nvme-zns-set-zone-desc.1} | 53 +- ...e-log.html => nvme-zns-set-zone-desc.html} | 69 +- Documentation/nvme-zns-set-zone-desc.txt | 50 + Documentation/nvme-zns-zone-append.1 | 133 + ...ize-log.html => nvme-zns-zone-append.html} | 205 +- Documentation/nvme-zns-zone-append.txt | 96 + Documentation/nvme-zns-zone-mgmt-recv.1 | 121 + ...-log.html => nvme-zns-zone-mgmt-recv.html} | 102 +- Documentation/nvme-zns-zone-mgmt-recv.txt | 78 + Documentation/nvme-zns-zone-mgmt-send.1 | 126 + ...-log.html => nvme-zns-zone-mgmt-send.html} | 112 +- Documentation/nvme-zns-zone-mgmt-send.txt | 77 + Documentation/nvme.1 | 63 +- Documentation/nvme.html | 92 +- Makefile | 33 +- NVME-VERSION-GEN | 2 +- README.md | 7 + common.h | 3 + completions/_nvme | 149 +- completions/bash-nvme-completion.sh | 54 +- fabrics.c | 744 ++-- fabrics.h | 42 + linux/nvme.h | 509 ++- nvme-builtin.h | 11 + nvme-filters.c | 16 + nvme-ioctl.c | 314 +- nvme-ioctl.h | 74 +- nvme-print.c | 1804 ++++++++- nvme-print.h | 56 +- nvme-rpmb.c | 1001 +++++ nvme-status.c | 37 +- nvme-topology.c | 259 +- nvme.c | 1427 +++++-- nvme.h | 43 +- nvme.spec.in | 4 +- .../dracut-conf/70-nvmf-autoconnect.conf.in | 2 +- plugins/amzn/amzn-nvme.c | 59 + plugins/amzn/amzn-nvme.h | 17 + plugins/dera/dera-nvme.c | 3 +- plugins/huawei/huawei-nvme.c | 3 +- plugins/intel/intel-nvme.c | 513 ++- plugins/intel/intel-nvme.h | 1 + plugins/memblaze/memblaze-nvme.c | 789 +++- plugins/memblaze/memblaze-nvme.h | 13 +- plugins/memblaze/memblaze-utils.h | 63 + plugins/micron/micron-nvme.c | 3305 ++++++++++------ plugins/micron/micron-nvme.h | 10 + plugins/netapp/netapp-nvme.c | 13 +- plugins/nvidia/nvidia-nvme.c | 58 + plugins/nvidia/nvidia-nvme.h | 17 + plugins/scaleflux/sfx-nvme.c | 383 +- plugins/scaleflux/sfx-nvme.h | 4 +- plugins/seagate/seagate-nvme.c | 33 +- plugins/shannon/shannon-nvme.c | 7 +- plugins/toshiba/toshiba-nvme.c | 2 +- plugins/virtium/virtium-nvme.c | 6 +- plugins/wdc/wdc-nvme.c | 3327 ++++++++++++++--- plugins/wdc/wdc-nvme.h | 5 + plugins/wdc/wdc-utils.c | 15 + plugins/wdc/wdc-utils.h | 1 + plugins/ymtc/ymtc-nvme.c | 148 + plugins/ymtc/ymtc-nvme.h | 24 + plugins/ymtc/ymtc-utils.h | 80 + plugins/zns/zns.c | 923 +++++ plugins/zns/zns.h | 30 + scripts/gen-hostnqn.sh | 6 +- tests/nvme_get_features_test.py | 7 +- util/argconfig.c | 31 +- util/argconfig.h | 4 +- util/cleanup.c | 4 + util/cleanup.h | 18 + util/json.c | 26 +- util/json.h | 17 +- util/log.c | 90 + util/log.h | 34 + 305 files changed, 20664 insertions(+), 6099 deletions(-) create mode 100644 .github/workflows/c-cpp.yml create mode 100644 Documentation/nvme-copy.1 copy Documentation/{nvme-resv-release.html => nvme-copy.html} (76%) create mode 100644 Documentation/nvme-copy.txt copy Documentation/{nvme-endurance-log.1 => nvme-endurance-event-agg-log.1} (56%) copy Documentation/{nvme-endurance-log.html => nvme-endurance-event-agg-log.html} (88%) create mode 100644 Documentation/nvme-endurance-event-agg-log.txt copy Documentation/{nvme-transcend-healthvalue.1 => nvme-id-iocs.1} (69%) copy Documentation/{nvme-list-ns.html => nvme-id-iocs.html} (88%) create mode 100644 Documentation/nvme-id-iocs.txt copy Documentation/{nvme-fw-log.1 => nvme-lba-status-log.1} (60%) copy Documentation/{nvme-endurance-log.html => nvme-lba-status-log.html} (87%) create mode 100644 Documentation/nvme-lba-status-log.txt copy Documentation/{nvme-transcend-badblock.1 => nvme-micron-clear-pcie-errors.1} (72%) copy Documentation/{nvme-get-ns-id.html => nvme-micron-clear-pcie-errors.html} (88%) create mode 100644 Documentation/nvme-micron-clear-pcie-errors.txt copy Documentation/{nvme-intel-market-name.1 => nvme-micron-internal-log.1} (60%) copy Documentation/{nvme-wdc-vs-nand-stats.html => nvme-micron-internal-log.html} (87%) create mode 100644 Documentation/nvme-micron-internal-log.txt copy Documentation/{nvme-transcend-badblock.1 => nvme-micron-nand-stats.1} (72%) copy Documentation/{nvme-get-ns-id.html => nvme-micron-nand-stats.html} (88%) create mode 100644 Documentation/nvme-micron-nand-stats.txt copy Documentation/{nvme-transcend-badblock.1 => nvme-micron-pcie-stats.1} (73%) copy Documentation/{nvme-get-ns-id.html => nvme-micron-pcie-stats.html} (88%) create mode 100644 Documentation/nvme-micron-pcie-stats.txt copy Documentation/{nvme-wdc-drive-log.1 => nvme-micron-selective-download.1} (52%) copy Documentation/{nvme-endurance-log.html => nvme-micron-selective-download.html} (84%) create mode 100644 Documentation/nvme-micron-selective-download.txt copy Documentation/{nvme-transcend-badblock.1 => nvme-micron-temperature-stats.1} (71%) copy Documentation/{nvme-get-ns-id.html => nvme-micron-temperature-stats.html} (88%) create mode 100644 Documentation/nvme-micron-temperature-stats.txt copy Documentation/{nvme-fw-log.1 => nvme-nvm-id-ctrl.1} (58%) copy Documentation/{nvme-endurance-log.html => nvme-nvm-id-ctrl.html} (88%) create mode 100644 Documentation/nvme-nvm-id-ctrl.txt create mode 100644 Documentation/nvme-persistent-event-log.1 copy Documentation/{nvme-endurance-log.html => nvme-persistent-event-log.html} (84%) create mode 100644 Documentation/nvme-persistent-event-log.txt copy Documentation/{nvme-smart-log.1 => nvme-pred-lat-event-agg-log.1} (51%) copy Documentation/{nvme-endurance-log.html => nvme-pred-lat-event-agg-log.html} (85%) create mode 100644 Documentation/nvme-pred-lat-event-agg-log.txt copy Documentation/{nvme-smart-log.1 => nvme-predictable-lat-log.1} (55%) copy Documentation/{nvme-endurance-log.html => nvme-predictable-lat-log.html} (87%) create mode 100644 Documentation/nvme-predictable-lat-log.txt copy Documentation/{nvme-fw-log.1 => nvme-resv-notif-log.1} (59%) copy Documentation/{nvme-endurance-log.html => nvme-resv-notif-log.html} (88%) create mode 100644 Documentation/nvme-resv-notif-log.txt create mode 100644 Documentation/nvme-rpmb.1 copy Documentation/{nvme-wdc-vs-internal-log.html => nvme-rpmb.html} (70%) create mode 100644 Documentation/nvme-rpmb.txt copy Documentation/{nvme-disconnect-all.1 => nvme-wdc-capabilities.1} (71%) copy Documentation/{nvme-get-ns-id.html => nvme-wdc-capabilities.html} (90%) create mode 100644 Documentation/nvme-wdc-capabilities.txt copy Documentation/{nvme-disconnect-all.1 => nvme-wdc-cloud-SSD-plugin-version.1} (60%) copy Documentation/{nvme-get-ns-id.html => nvme-wdc-cloud-SSD-plugin-version.html} (90%) create mode 100644 Documentation/nvme-wdc-cloud-SSD-plugin-version.txt copy Documentation/{nvme-wdc-drive-log.1 => nvme-wdc-enc-get-log.1} (57%) copy Documentation/{nvme-endurance-log.html => nvme-wdc-enc-get-log.html} (86%) create mode 100644 Documentation/nvme-wdc-enc-get-log.txt copy Documentation/{nvme-wdc-purge-monitor.1 => nvme-wdc-vs-temperature-stats.1} (53%) copy Documentation/{nvme-sanitize-log.html => nvme-wdc-vs-temperature-stats.html} (80%) create mode 100644 Documentation/nvme-wdc-vs-temperature-stats.txt copy Documentation/{nvme-fw-log.1 => nvme-zns-changed-zone-list.1} (64%) copy Documentation/{nvme-endurance-log.html => nvme-zns-changed-zone-list.html} (88%) create mode 100644 Documentation/nvme-zns-changed-zone-list.txt copy Documentation/{nvme-wdc-drive-resize.1 => nvme-zns-close-zone.1} (59%) copy Documentation/{nvme-list-ns.html => nvme-zns-close-zone.html} (87%) create mode 100644 Documentation/nvme-zns-close-zone.txt copy Documentation/{nvme-wdc-drive-resize.1 => nvme-zns-finish-zone.1} (58%) copy Documentation/{nvme-endurance-log.html => nvme-zns-finish-zone.html} (87%) create mode 100644 Documentation/nvme-zns-finish-zone.txt copy Documentation/{nvme-fw-log.1 => nvme-zns-id-ctrl.1} (64%) copy Documentation/{nvme-endurance-log.html => nvme-zns-id-ctrl.html} (88%) create mode 100644 Documentation/nvme-zns-id-ctrl.txt copy Documentation/{nvme-fw-log.1 => nvme-zns-id-ns.1} (60%) copy Documentation/{nvme-endurance-log.html => nvme-zns-id-ns.html} (87%) create mode 100644 Documentation/nvme-zns-id-ns.txt copy Documentation/{nvme-wdc-drive-resize.1 => nvme-zns-offline-zone.1} (58%) copy Documentation/{nvme-endurance-log.html => nvme-zns-offline-zone.html} (87%) create mode 100644 Documentation/nvme-zns-offline-zone.txt copy Documentation/{nvme-wdc-drive-resize.1 => nvme-zns-open-zone.1} (59%) copy Documentation/{nvme-list-ns.html => nvme-zns-open-zone.html} (87%) create mode 100644 Documentation/nvme-zns-open-zone.txt create mode 100644 Documentation/nvme-zns-report-zones.1 copy Documentation/{nvme-resv-release.html => nvme-zns-report-zones.html} (77%) create mode 100644 Documentation/nvme-zns-report-zones.txt copy Documentation/{nvme-wdc-drive-resize.1 => nvme-zns-reset-zone.1} (58%) copy Documentation/{nvme-endurance-log.html => nvme-zns-reset-zone.html} (87%) create mode 100644 Documentation/nvme-zns-reset-zone.txt copy Documentation/{nvme-lnvm-diag-set-bbtbl.1 => nvme-zns-set-zone-desc.1} (51%) copy Documentation/{nvme-endurance-log.html => nvme-zns-set-zone-desc.html} (86%) create mode 100644 Documentation/nvme-zns-set-zone-desc.txt create mode 100644 Documentation/nvme-zns-zone-append.1 copy Documentation/{nvme-sanitize-log.html => nvme-zns-zone-append.html} (78%) create mode 100644 Documentation/nvme-zns-zone-append.txt create mode 100644 Documentation/nvme-zns-zone-mgmt-recv.1 copy Documentation/{nvme-endurance-log.html => nvme-zns-zone-mgmt-recv.html} (82%) create mode 100644 Documentation/nvme-zns-zone-mgmt-recv.txt create mode 100644 Documentation/nvme-zns-zone-mgmt-send.1 copy Documentation/{nvme-endurance-log.html => nvme-zns-zone-mgmt-send.html} (83%) create mode 100644 Documentation/nvme-zns-zone-mgmt-send.txt mode change 100644 => 100755 nvme-print.c create mode 100644 nvme-rpmb.c create mode 100644 plugins/amzn/amzn-nvme.c create mode 100644 plugins/amzn/amzn-nvme.h create mode 100644 plugins/nvidia/nvidia-nvme.c create mode 100644 plugins/nvidia/nvidia-nvme.h create mode 100644 plugins/ymtc/ymtc-nvme.c create mode 100644 plugins/ymtc/ymtc-nvme.h create mode 100644 plugins/ymtc/ymtc-utils.h create mode 100644 plugins/zns/zns.c create mode 100644 plugins/zns/zns.h create mode 100644 util/cleanup.c create mode 100644 util/cleanup.h create mode 100644 util/log.c create mode 100644 util/log.h diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..d2f94e9 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,18 @@ +name: C/C++ CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: make + run: sudo apt-get install gcc-10-powerpc* && make clean && make && make clean && make LD=powerpc64le-linux-gnu-ld CC=powerpc64le-linux-gnu-gcc-10 CFLAGS='-O2 -g -Wall -Wformat-security -Werror -m64 -mcpu=power8 -mtune=power8 -I -I/usr/powerpc64-linux-gnu/include/' + diff --git a/.gitignore b/.gitignore index b0efd0b..8e5ae00 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ a.out *~ *.swp NVME-VERSION-FILE +nvme.spec +nvme-*.tar.gz +version cscope.* diff --git a/Documentation/cmds-main.txt b/Documentation/cmds-main.txt index 824ca69..46df03d 100644 --- a/Documentation/cmds-main.txt +++ b/Documentation/cmds-main.txt @@ -17,7 +17,10 @@ linknvme:nvme-format[1]:: Format namespace(s) linknvme:nvme-fw-activate[1]:: - F/W Activate + F/W Activate (in old version < 1.2) + +linknvme:nvme-fw-commit[1]:: + F/W Commit (in > 1.2) linknvme:nvme-fw-download[1]:: F/W Download @@ -34,15 +37,24 @@ linknvme:nvme-get-log[1]:: linknvme:nvme-telemetry-log[1]:: Telemetry Host-Initiated Log +linknvme:nvme-changed-ns-list-log[1]:: + Retrieve Changed Namespace List Log + linknvme:nvme-smart-log[1]:: Retrieve Smart Log +linknvme:nvme-ana-log[1]:: + Retreive ANA(Asymmetric Namespace Access) Log + linknvme:nvme-endurance-log[1]:: Retrieve endurance Log linknvme:nvme-effects-log[1]:: Retrieve effects Log +linknvme:nvme-self-test-log[1]:: + Retrieve Device Self-test Log + linknvme:nvme-get-ns-id[1]:: Retrieve namespace identifier @@ -55,6 +67,12 @@ linknvme:nvme-id-ctrl[1]:: linknvme:nvme-id-ns[1]:: Identify Namespace +linknvme:nvme-id-nvmset[1]:: + Identify NVM Set List + +linknvme:nvme-id-iocs[1]:: + Identify I/O Command Set + linknvme:nvme-create-ns[1]:: Create a new namespace @@ -82,6 +100,15 @@ linknvme:nvme-list[1]:: linknvme:nvme-list-ctrl[1]:: List controller in NVMe subsystem +linknvme:nvme-list-subsys[1]:: + List NVMe subsystems + +linknvme:nvme-reset[1]:: + Reset a NVMe controller + +linknvme:nvme-device-self-test[1]:: + Issue Device Self-test Command + linknvme:nvme-read[1]:: Issue IO Read Command @@ -112,6 +139,12 @@ linknvme:nvme-security-recv[1]:: linknvme:nvme-security-send[1]:: Security Send +linknvme:nvme-dsm[1]:: + Issue Data Set Management Command + +linknvme:nvme-copy[1]:: + Issue Simple Copy Command + linknvme:nvme-set-feature[1]:: Set Feature diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1 index f6d247f..286709f 100644 --- a/Documentation/nvme-admin-passthru.1 +++ b/Documentation/nvme-admin-passthru.1 @@ -2,12 +2,12 @@ .\" Title: nvme-admin-passthru .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/24/2020 +.\" Date: 10/20/2020 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ADMIN\-PASSTHR" "1" "04/24/2020" "NVMe" "NVMe Manual" +.TH "NVME\-ADMIN\-PASSTHR" "1" "10/20/2020" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-ana-log.1 b/Documentation/nvme-ana-log.1 index 862f42d..5ba4cc3 100644 --- a/Documentation/nvme-ana-log.1 +++ b/Documentation/nvme-ana-log.1 @@ -2,12 +2,12 @@ .\" Title: nvme-ana-log .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/24/2020 +.\" Date: 10/20/2020 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ANA\-LOG" "1" "04/24/2020" "NVMe" "NVMe Manual" +.TH "NVME\-ANA\-LOG" "1" "10/20/2020" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-attach-ns.1 b/Documentation/nvme-attach-ns.1 index 0af22ae..37f63a8 100644 --- a/Documentation/nvme-attach-ns.1 +++ b/Documentation/nvme-attach-ns.1 @@ -2,12 +2,12 @@ .\" Title: nvme-attach-ns .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/24/2020 +.\" Date: 10/20/2020 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ATTACH\-NS" "1" "04/24/2020" "NVMe" "NVMe Manual" +.TH "NVME\-ATTACH\-NS" "1" "10/20/2020" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-changed-ns-list-log.1 b/Documentation/nvme-changed-ns-list-log.1 index 13dda55..97372fd 100644 --- a/Documentation/nvme-changed-ns-list-log.1 +++ b/Documentation/nvme-changed-ns-list-log.1 @@ -2,12 +2,12 @@ .\" Title: nvme-changed-ns-list-log .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/24/2020 +.\" Date: 10/20/2020 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CHANGED\-NS\-L" "1" "04/24/2020" "NVMe" "NVMe Manual" +.TH "NVME\-CHANGED\-NS\-L" "1" "10/20/2020" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-compare.1 b/Documentation/nvme-compare.1 index 0f1c6ff..0638190 100644 --- a/Documentation/nvme-compare.1 +++ b/Documentation/nvme-compare.1 @@ -2,12 +2,12 @@ .\" Title: nvme-compare .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/24/2020 +.\" Date: 10/20/2020 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-COMPARE" "1" "04/24/2020" "NVMe" "NVMe Manual" +.TH "NVME\-COMPARE" "1" "10/20/2020" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-connect-all.1 b/Documentation/nvme-connect-all.1 index f829935..a53a017 100644 --- a/Documentation/nvme-connect-all.1 +++ b/Documentation/nvme-connect-all.1 @@ -2,12 +2,12 @@ .\" Title: nvme-connect-all .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/29/2020 +.\" Date: 01/20/2021 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CONNECT\-ALL" "1" "04/29/2020" "NVMe" "NVMe Manual" +.TH "NVME\-CONNECT\-ALL" "1" "01/20/2021" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,7 +51,7 @@ nvme-connect-all \- Discover and Connect to Fabrics controllers\&. [\-\-queue\-size=<#> | \-Q <#>] [\-\-matching | \-m] [\-\-persistent | \-p] - [\-\-quiet | \-q] + [\-\-quiet | \-S] .fi .SH "DESCRIPTION" .sp @@ -72,6 +72,7 @@ allbox tab(:); lt lt lt lt lt lt +lt lt lt lt. T{ Value @@ -90,6 +91,11 @@ T}:T{ The network fabric is a Fibre Channel network\&. T} T{ +tcp +T}:T{ +The network fabric is a TCP/IP network\&. +T} +T{ loop T}:T{ Connect to a NVMe over Fabrics target on the local host @@ -187,7 +193,7 @@ If a traddr was specified on the command line or in the configuration file, only Don\(cqt remove the discovery controller after retrieving the discovery log page\&. .RE .PP -\-q, \-\-quiet +\-S, \-\-quiet .RS 4 Suppress error messages\&. .RE diff --git a/Documentation/nvme-connect-all.html b/Documentation/nvme-connect-all.html index b5f22f7..f779c7b 100644 --- a/Documentation/nvme-connect-all.html +++ b/Documentation/nvme-connect-all.html @@ -768,7 +768,7 @@ nvme-connect-all(1) Manual Page [--queue-size=<#> | -Q <#>] [--matching | -m] [--persistent | -p] - [--quiet | -q] + [--quiet | -S]
@@ -825,6 +825,10 @@ cellspacing="0" cellpadding="4">

WIP The network fabric is a Fibre Channel network.

+

tcp

+

The network fabric is a TCP/IP network.

+ +

loop

Connect to a NVMe over Fabrics target on the local host

@@ -1044,7 +1048,7 @@ cellspacing="0" cellpadding="4">

--q +-S
--quiet @@ -1111,7 +1115,7 @@ nvme-connect(1)

diff --git a/Documentation/nvme-connect-all.txt b/Documentation/nvme-connect-all.txt index 63d3c8f..820dd6c 100644 --- a/Documentation/nvme-connect-all.txt +++ b/Documentation/nvme-connect-all.txt @@ -27,7 +27,7 @@ SYNOPSIS [--queue-size=<#> | -Q <#>] [--matching | -m] [--persistent | -p] - [--quiet | -q] + [--quiet | -S] DESCRIPTION ----------- @@ -58,6 +58,7 @@ OPTIONS |Value|Definition |rdma|The network fabric is an rdma network (RoCE, iWARP, Infiniband, basic rdma, etc) |fc |*WIP* The network fabric is a Fibre Channel network. +|tcp |The network fabric is a TCP/IP network. |loop|Connect to a NVMe over Fabrics target on the local host |================= @@ -153,7 +154,7 @@ OPTIONS Don't remove the discovery controller after retrieving the discovery log page. --q:: +-S:: --quiet:: Suppress error messages. diff --git a/Documentation/nvme-connect.1 b/Documentation/nvme-connect.1 index 9170d01..64d18bb 100644 --- a/Documentation/nvme-connect.1 +++ b/Documentation/nvme-connect.1 @@ -2,12 +2,12 @@ .\" Title: nvme-connect .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/24/2020 +.\" Date: 10/20/2020 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CONNECT" "1" "04/24/2020" "NVMe" "NVMe Manual" +.TH "NVME\-CONNECT" "1" "10/20/2020" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -65,6 +65,7 @@ allbox tab(:); lt lt lt lt lt lt +lt lt lt lt. T{ Value @@ -83,6 +84,11 @@ T}:T{ The network fabric is a Fibre Channel network\&. T} T{ +tcp +T}:T{ +The network fabric is a TCP/IP network\&. +T} +T{ loop T}:T{ Connect to a NVMe over Fabrics target on the local host diff --git a/Documentation/nvme-connect.html b/Documentation/nvme-connect.html index 3387333..1f523dc 100644 --- a/Documentation/nvme-connect.html +++ b/Documentation/nvme-connect.html @@ -4,7 +4,7 @@ - + nvme-connect(1) - - - -

SYNOPSIS

-
-
-
nvme ns-rescan <device>
-
-
-
-

DESCRIPTION

-
-

Requests NVMe controller rescans the namespaces. The <device> param is mandatory and must -be an NVMe character device (ex: /dev/nvme0).

-
-

OPTIONS

-
-

None

-
-

EXAMPLES

-
-
    -
  • -

    -Rescans the nvme namespaces. -

    -
    -
    -
    # nvme ns-rescan /dev/nvme0
    -
    -
  • -
-
-

NVME

-
-

Part of the nvme-user suite

-
- - - + + + + + + +nvme-ns-rescan(1) + + + + + +
+
+

SYNOPSIS

+
+
+
nvme ns-rescan <device>
+
+
+
+
+
+

DESCRIPTION

+
+

Requests NVMe controller rescans the namespaces. The <device> param is mandatory and must +be an NVMe character device (ex: /dev/nvme0).

+
+
+
+

OPTIONS

+
+

None

+
+
+
+

EXAMPLES

+
+
    +
  • +

    +Rescans the nvme namespaces. +

    +
    +
    +
    # nvme ns-rescan /dev/nvme0
    +
    +
  • +
+
+
+
+

NVME

+
+

Part of the nvme-user suite

+
+
+
+

+ + + diff --git a/Documentation/nvme-fw-log.1 b/Documentation/nvme-nvm-id-ctrl.1 similarity index 58% copy from Documentation/nvme-fw-log.1 copy to Documentation/nvme-nvm-id-ctrl.1 index f96bcdc..4d1c634 100644 --- a/Documentation/nvme-fw-log.1 +++ b/Documentation/nvme-nvm-id-ctrl.1 @@ -1,13 +1,13 @@ '\" t -.\" Title: nvme-fw-log -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/24/2020 +.\" Title: nvme-nvm-id-ctrl +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 02/18/2021 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FW\-LOG" "1" "04/24/2020" "NVMe" "NVMe Manual" +.TH "NVME\-NVM\-ID\-CTRL" "1" "02/18/2021" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,27 +28,21 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -nvme-fw-log \- Send NVMe Firmware log page request, returns result and log +nvme-nvm-id-ctrl \- Send NVMe Identify Controller, return NVM command set structure .SH "SYNOPSIS" .sp .nf -\fInvme fw\-log\fR [\-\-raw\-binary | \-b] - [\-\-output\-format= | \-o ] +\fInvme nvm\-id\-ctrl\fR [\-o | \-\-output\-format=] .fi .SH "DESCRIPTION" .sp -Retrieves the NVMe Firmware log page from an NVMe device and provides the returned structure\&. +For the NVMe device given, sends the NVM command set\(cqs identify controller 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 returned f/w log structure may be returned in one of several ways depending on the option flags; the structure may parsed by the program and printed in a readable format or the raw buffer may be printed to stdout for another program to parse\&. +On success, the data structure returned by the device will be decoded and displayed in one of several ways\&. .SH "OPTIONS" .PP -\-b, \-\-raw\-binary -.RS 4 -Print the raw fw log buffer to stdout\&. -.RE -.PP \-o , \-\-output\-format= .RS 4 Set the reporting format to @@ -66,13 +60,13 @@ Set the reporting format to .sp -1 .IP \(bu 2.3 .\} -Print the firmware log page in a human readable format: +Has the program interpret the returned buffer and display the known fields in a human readable format: .sp .if n \{\ .RS 4 .\} .nf -# nvme fw\-log /dev/nvme0 +# nvme nvm\-id\-ctrl /dev/nvme0 .fi .if n \{\ .RE @@ -87,20 +81,18 @@ Print the firmware log page in a human readable format: .sp -1 .IP \(bu 2.3 .\} -Print the log firmware to a file: +Show the output in json format .sp .if n \{\ .RS 4 .\} .nf -# nvme fw\-log /dev/nvme0 \-\-raw\-binary > fw_log\&.raw +# nvme nvm\-id\-ctrl /dev/nvme0 \-o json .fi .if n \{\ .RE .\} -.sp -It is probably a bad idea to not redirect stdout when using this mode\&. .RE .SH "NVME" .sp -Part of the nvme\-user suite +Part of nvme\-cli diff --git a/Documentation/nvme-endurance-log.html b/Documentation/nvme-nvm-id-ctrl.html similarity index 88% copy from Documentation/nvme-endurance-log.html copy to Documentation/nvme-nvm-id-ctrl.html index 42fe267..fa08be0 100644 --- a/Documentation/nvme-endurance-log.html +++ b/Documentation/nvme-nvm-id-ctrl.html @@ -5,7 +5,7 @@ -nvme-endurance-log(1) +nvme-nvm-id-ctrl(1)