]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
3 years agoMerge pull request #1444 from igaw/fix-json-encoding
Daniel Wagner [Fri, 18 Mar 2022 07:33:43 +0000 (08:33 +0100)]
Merge pull request #1444 from igaw/fix-json-encoding

nvme: Do not slash escape strings in JSON output

3 years agonvme: Do not slash escape strings in JSON output
Daniel Wagner [Thu, 17 Mar 2022 14:32:26 +0000 (15:32 +0100)]
nvme: Do not slash escape strings in JSON output

nvme-cli 1.x didn't do any (optional) slash escaping in JSON
output. Don't break backwards compatibility unnecessary.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1248 from minwooim/print-generic-device-in-list
Daniel Wagner [Thu, 17 Mar 2022 14:00:26 +0000 (15:00 +0100)]
Merge pull request #1248 from minwooim/print-generic-device-in-list

nvme-print: print generic device in list command

3 years agoMerge pull request #1416 from sc108-lee/build
Daniel Wagner [Thu, 17 Mar 2022 11:59:17 +0000 (12:59 +0100)]
Merge pull request #1416 from sc108-lee/build

installation path modification

3 years agorpm: Add prefix for sysconfdir
Steven Seungcheol Lee [Thu, 10 Mar 2022 08:14:14 +0000 (17:14 +0900)]
rpm: Add prefix for sysconfdir

rpm macro sysconfdir does not include prefix

bug fix for wrong macro use
%{_sysconfdir} defined as /etc
as is:
    /buildroot_somepath//etc/nvme/hostnqn

to be:
    /buildroot_somepath/etc/nvme/hostnqn

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agomeson: installation prefix revert
Steven Seungcheol Lee [Thu, 10 Mar 2022 08:05:43 +0000 (17:05 +0900)]
meson: installation prefix revert

make sbin dir using prefix as other installation dir
    nvme <= v1.16 SBINDIR has prefix like below
    SBINDIR = $(PREFIX)/sbin

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agomeson: bash-completion installation path is reverted
Steven Seungcheol Lee [Thu, 10 Mar 2022 07:39:52 +0000 (16:39 +0900)]
meson: bash-completion installation path is reverted

orignal Makefile install in blow path
$(DESTDIR)$(PREFIX)/share/bash-completion/completions/nvme

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1440 from Arunpandian15/plugin_16
Daniel Wagner [Thu, 17 Mar 2022 10:57:35 +0000 (11:57 +0100)]
Merge pull request #1440 from Arunpandian15/plugin_16

cmd-plugins: Add plugin commands in doc

3 years agocmd-plugins: Add plugin commands in doc
Arunpandian J [Thu, 17 Mar 2022 10:39:46 +0000 (16:09 +0530)]
cmd-plugins: Add plugin commands in doc

Added WDC plugin commands in cmd-plugins.txt file

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1437 from tbzatek/json-strings
Daniel Wagner [Thu, 17 Mar 2022 08:08:23 +0000 (09:08 +0100)]
Merge pull request #1437 from tbzatek/json-strings

nvme-print: Make JSON keys consistent with nvme-cli 1.x

3 years agonvme-print: Make JSON keys consistent with nvme-cli 1.x
Tomas Bzatek [Wed, 16 Mar 2022 17:59:00 +0000 (18:59 +0100)]
nvme-print: Make JSON keys consistent with nvme-cli 1.x

3 years agonvme-print: print generic device in list command
Minwoo Im [Thu, 18 Nov 2021 13:20:12 +0000 (22:20 +0900)]
nvme-print: print generic device in list command

Generic namespace device is one of I/O paths that needs to be listed up
in the `nvme list` command along with the blkdev.  Print it out in the
simple list command.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
3 years agoMerge pull request #1436 from hreinecke/disc-nqn
Hannes Reinecke [Wed, 16 Mar 2022 14:39:13 +0000 (15:39 +0100)]
Merge pull request #1436 from hreinecke/disc-nqn

Fixup persistent discover controller usage

3 years agofabrics: check for discovery controller instead of subsystem NQN
Hannes Reinecke [Wed, 16 Mar 2022 14:32:06 +0000 (15:32 +0100)]
fabrics: check for discovery controller instead of subsystem NQN

Unique discovery subsystems have a unique subsystem NQN, to we cannot
check for the standard discovery NQN when checking for persistent
discovery controllers, but rather have to check if the subsystem is a
discovery subsystem.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Update libnvme wrap
Hannes Reinecke [Fri, 11 Mar 2022 14:42:46 +0000 (15:42 +0100)]
build: Update libnvme wrap

Update to pull in fix for nvme_free_ctrl() and systemd paths.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1434 from Arunpandian15/plugin_16
Daniel Wagner [Wed, 16 Mar 2022 11:43:49 +0000 (12:43 +0100)]
Merge pull request #1434 from Arunpandian15/plugin_16

cmd-plugins: Add transcend, virtium plugin commands

3 years agocmd-plugins: Add transcend, virtium plugin commands
Arunpandian J [Wed, 16 Mar 2022 11:33:06 +0000 (17:03 +0530)]
cmd-plugins: Add transcend, virtium plugin commands

updated cmd-plugins.txt file with transcend, virtium
plugin commands

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1431 from igaw/fix-sysconfdir
Daniel Wagner [Wed, 16 Mar 2022 11:31:02 +0000 (12:31 +0100)]
Merge pull request #1431 from igaw/fix-sysconfdir

Honor sysconfdir, sbindir and bindir

3 years agonvmf-autoconnect: Add option to specify path to systemctl
Daniel Wagner [Wed, 16 Mar 2022 10:47:46 +0000 (11:47 +0100)]
nvmf-autoconnect: Add option to specify path to systemctl

Many distros have adapted the usr merge and hence systemctl is install
in /usr/bin. Instead just hard coding the new path, let's introduce a
new build option to allow specifying the path to the systemclt
binary.

Note, the scripts also have hard coded paths to /bin/sh or
/bin/echo. None of these paths are covered by POSIX but in practice
all distros have those as symlinks when the usr merge have been
implemented. Let's address these issues when the pop up.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvmf-autoconnect: Honor sysconfdir, sbindir and bindir
Daniel Wagner [Tue, 15 Mar 2022 18:29:48 +0000 (19:29 +0100)]
nvmf-autoconnect: Honor sysconfdir, sbindir and bindir

The autoconnect files use hard coded paths for the config files and
the binaries. Make these configurable.

Not all files need to run through the configure_files step but for
consistenty sake, let's treat all the same.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Honor sysconfdir for hostnqn and hostid files
Daniel Wagner [Tue, 15 Mar 2022 18:25:22 +0000 (19:25 +0100)]
fabrics: Honor sysconfdir for hostnqn and hostid files

When sysconfdir is set during build the hostnqn and hostid file should
be installed under this path. Replace the hard coded path and also
update the documentation.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Copy include adoc files to build dir
Daniel Wagner [Tue, 15 Mar 2022 18:08:25 +0000 (19:08 +0100)]
build: Copy include adoc files to build dir

asciidoctor wants all file to live under one common directory root,
thus we can't provide a search path for the include files. Copy
include files to the build dir.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Resort adoc_sources
Daniel Wagner [Tue, 15 Mar 2022 17:23:39 +0000 (18:23 +0100)]
build: Resort adoc_sources

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1428 from martin-belanger/fix-typo
Daniel Wagner [Tue, 15 Mar 2022 16:42:52 +0000 (17:42 +0100)]
Merge pull request #1428 from martin-belanger/fix-typo

Fix typo - hsot to host

3 years agoMerge pull request #1429 from tbzatek/fixes-1
Daniel Wagner [Tue, 15 Mar 2022 16:36:17 +0000 (17:36 +0100)]
Merge pull request #1429 from tbzatek/fixes-1

Minor compiler warning fixes

3 years agoplugins/memblaze: Code style fixes
Tomas Bzatek [Tue, 15 Mar 2022 15:01:54 +0000 (16:01 +0100)]
plugins/memblaze: Code style fixes

clang complains, purely cosmetic change:

 ../plugins/memblaze/memblaze-nvme.c:1119:2: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
         return err;
         ^
 ../plugins/memblaze/memblaze-nvme.c:1102:7: note: previous statement is here
     } else if (err > 0)
       ^

3 years agoplugins/wdc: Fix a use-after-free
Tomas Bzatek [Tue, 15 Mar 2022 14:50:42 +0000 (15:50 +0100)]
plugins/wdc: Fix a use-after-free

 ../plugins/wdc/wdc-nvme.c: In function ‘get_dev_mgment_cbs_data’:
 ../plugins/wdc/wdc-nvme.c:1714:31: warning: pointer ‘hdr_ptr’ used after ‘free’ [-Wuse-after-free]
  1714 |                 data = calloc(le32_to_cpu(hdr_ptr->length), sizeof(__u8));
       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../plugins/wdc/wdc-nvme.c:1713:17: note: call to ‘free’ here
  1713 |                 free(data);
       |                 ^~~~~~~~~~

3 years agoFix typo - hsot to host
Martin Belanger [Tue, 15 Mar 2022 11:35:16 +0000 (07:35 -0400)]
Fix typo - hsot to host

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
3 years agoMerge pull request #1425 from tbzatek/connect-return-code
Hannes Reinecke [Tue, 15 Mar 2022 07:34:42 +0000 (08:34 +0100)]
Merge pull request #1425 from tbzatek/connect-return-code

connect: Set errno to zero on nvmf_add_ctrl() success

3 years agoconnect: Set errno to zero on nvmf_add_ctrl() success
Tomas Bzatek [Mon, 14 Mar 2022 17:15:20 +0000 (18:15 +0100)]
connect: Set errno to zero on nvmf_add_ctrl() success

The libnvme's nvmf_add_ctrl() might return zero (success) while
having errno set to a non-zero value due to lots of calls inside.
And since nvmf_connect() returns errno primarily, make sure
it's zeroed on success.

See related https://github.com/linux-nvme/libnvme/pull/292

3 years agoMerge pull request #1418 from Arunpandian15/tests_10
Daniel Wagner [Mon, 14 Mar 2022 08:48:32 +0000 (09:48 +0100)]
Merge pull request #1418 from Arunpandian15/tests_10

tests: Add tests for copy, verify, dsm commands

3 years agobuild: Add copy, DSM, verify command in meson build
Arunpandian J [Thu, 10 Mar 2022 11:12:03 +0000 (16:42 +0530)]
build: Add copy, DSM, verify command in meson build

meson.build file is updated with newly
added copy, DSM, verify tests

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agotests: verify command test case
Arunpandian J [Thu, 10 Mar 2022 11:07:22 +0000 (16:37 +0530)]
tests: verify command test case

test case added for verify command

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agotests: Add test for DSM command
Arunpandian J [Thu, 10 Mar 2022 11:02:37 +0000 (16:32 +0530)]
tests: Add test for DSM command

Data Set Management command test case
has beed added.

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agotests: Add test for copy command
Arunpandian J [Thu, 10 Mar 2022 10:56:49 +0000 (16:26 +0530)]
tests: Add test for copy command

test case added for copy command

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agonvme: constify variable in list_subsys v2.0-rc6
Daniel Wagner [Fri, 11 Mar 2022 16:46:46 +0000 (17:46 +0100)]
nvme: constify variable in list_subsys

The compiler complains with

../nvme.c: In function ‘list_subsys’:
../nvme.c:2478:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2478 |                 n = strrchr(devicename, 'n');
      |                   ^

devicename is of type 'const char *' so the returning pointer is of
the same type. Thus constify the n variable.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodoc: Regenerate all documentation
Daniel Wagner [Fri, 11 Mar 2022 16:33:04 +0000 (17:33 +0100)]
doc: Regenerate all documentation

Prepare for next release candiate.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Enable docs build in update docs script
Daniel Wagner [Fri, 11 Mar 2022 16:30:08 +0000 (17:30 +0100)]
build: Enable docs build in update docs script

Commit 59263bbcd3e4 ("build: Use boolean type for docs-build default")
introduced a command line option to enable docs build. Let's enable
this in the update docs script.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Fri, 11 Mar 2022 16:22:22 +0000 (17:22 +0100)]
build: Update libnvme wrap

Update to v1.0-rc6 of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1420 from hreinecke/ana-path
Hannes Reinecke [Fri, 11 Mar 2022 14:55:06 +0000 (15:55 +0100)]
Merge pull request #1420 from hreinecke/ana-path

Fixup ANA path state display

3 years agonvme: print out ANA state for 'list-subsys'
Hannes Reinecke [Fri, 11 Mar 2022 08:16:09 +0000 (09:16 +0100)]
nvme: print out ANA state for 'list-subsys'

Commit 00aeb92 ("nvme-list-subsys: Add device name argument
and print out ANA state") was not properly ported to libnvme/nvme-cli.
So port the missing bits.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Update libnvme wrap
Hannes Reinecke [Fri, 11 Mar 2022 14:42:46 +0000 (15:42 +0100)]
build: Update libnvme wrap

Update to pull in changes for ANA path state display.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1414 from igaw/init-args
Daniel Wagner [Fri, 11 Mar 2022 12:52:32 +0000 (13:52 +0100)]
Merge pull request #1414 from igaw/init-args

nvme: Initialize all arguments for passthru

3 years agoMerge pull request #1415 from Arunpandian15/plugin_netapp
Daniel Wagner [Fri, 11 Mar 2022 11:32:09 +0000 (12:32 +0100)]
Merge pull request #1415 from Arunpandian15/plugin_netapp

cmd-plugins: plugin commands update in doc

3 years agotests: fix typo for format-python
Arunpandian J [Thu, 10 Mar 2022 10:07:56 +0000 (15:37 +0530)]
tests: fix typo for format-python

changed the command to format-python as
per meson.build file

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agocmd-plugins: plugin commands update in doc
Arunpandian J [Wed, 9 Mar 2022 11:43:35 +0000 (17:13 +0530)]
cmd-plugins: plugin commands update in doc

netapp, toshiba plugin commands has been
added in cmd-plugins.txt

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agonvme: Explicit initialize all command line options
Daniel Wagner [Tue, 8 Mar 2022 14:32:25 +0000 (15:32 +0100)]
nvme: Explicit initialize all command line options

Sort the command line options like the appear on the command line.
Also tabilize and initialize all command options. The consistent
aligment of the options makes the reviewing simpler.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Explicit initialize passthru command line options
Daniel Wagner [Tue, 8 Mar 2022 11:52:46 +0000 (12:52 +0100)]
nvme: Explicit initialize passthru command line options

The metadata config options needs to be initialized to an empty
string because we are using strlen to figure out if it is set or not.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1413 from Arunpandian15/plugin_08
Daniel Wagner [Tue, 8 Mar 2022 13:14:39 +0000 (14:14 +0100)]
Merge pull request #1413 from Arunpandian15/plugin_08

cmd-plugins: Add dera, micron plugin commands in doc

3 years agoAdd dera, micron plugin commands in doc
Arunpandian J [Tue, 8 Mar 2022 11:22:39 +0000 (16:52 +0530)]
Add dera, micron plugin commands in doc

updated cmd-plugins.txt file with dera,
micron plugin commands.

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1410 from sc108-lee/list_ns
Daniel Wagner [Tue, 8 Mar 2022 08:42:52 +0000 (09:42 +0100)]
Merge pull request #1410 from sc108-lee/list_ns

nvme: list_ns bug fix (csi option enable)

3 years agoMerge pull request #1409 from sc108-lee/fix/write
Daniel Wagner [Tue, 8 Mar 2022 07:56:20 +0000 (08:56 +0100)]
Merge pull request #1409 from sc108-lee/fix/write

nvme: nvme write bug fix (no parse for option)

3 years agoMerge pull request #1408 from Arunpandian15/huawei_plugin
Daniel Wagner [Tue, 8 Mar 2022 07:41:10 +0000 (08:41 +0100)]
Merge pull request #1408 from Arunpandian15/huawei_plugin

cmd-plugins: Add huawei plugin commands

3 years agonvme: list_ns bug fix (csi option enable)
Steven Seungcheol Lee [Tue, 8 Mar 2022 07:07:09 +0000 (16:07 +0900)]
nvme: list_ns bug fix (csi option enable)

recover functionallty of 7f8d194e2532ba5c8240d731e87c39186ba03764
list ns with CNS(0x07, 0x1A) enabled

Reported-by: Kyungsik Shin <ks1012.shin@samsung.com>
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agobuild: Update libnvme wrap
Steven Seungcheol Lee [Tue, 8 Mar 2022 07:05:20 +0000 (16:05 +0900)]
build: Update libnvme wrap

bug fix for blow api included
nvme_identify_active_ns_list_csi
nvme_identify_allocated_ns_list_csi

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: nvme write bug fix (no parse for option)
Steven Seungcheol Lee [Mon, 7 Mar 2022 09:51:11 +0000 (18:51 +0900)]
nvme: nvme write bug fix (no parse for option)

occured from 0adb8c2c79df953bbef9e08ce684239a5650638f
write command always print below error
data size not provided

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agocmds-plugins: Add huawei plugin commands
Arunpandian J [Sat, 5 Mar 2022 04:36:15 +0000 (10:06 +0530)]
cmds-plugins: Add huawei plugin commands

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1407 from sc108-lee/master
Daniel Wagner [Fri, 4 Mar 2022 13:58:04 +0000 (14:58 +0100)]
Merge pull request #1407 from sc108-lee/master

build: Update libnvme wrap

3 years agoMerge pull request #1406 from sc108-lee/build_assert
Daniel Wagner [Fri, 4 Mar 2022 13:45:01 +0000 (14:45 +0100)]
Merge pull request #1406 from sc108-lee/build_assert

Add build_assert to fix debug build error

3 years agoMerge pull request #1403 from Arunpandian15/intel_cmds
Daniel Wagner [Fri, 4 Mar 2022 13:43:39 +0000 (14:43 +0100)]
Merge pull request #1403 from Arunpandian15/intel_cmds

cmds-main: Add intel plugin commands

3 years agobuild: Update libnvme wrap
Steven Seungcheol Lee [Fri, 4 Mar 2022 07:58:27 +0000 (16:58 +0900)]
build: Update libnvme wrap

types: fix status code type bug (wrong masking)
https://github.com/linux-nvme/libnvme/pull/274/commits

Bug:
    NVMe status: unrecognized(0x13)
Meant to be:
    NVMe status: PRP Offset Invalid: The Offset field for a PRP entry is invalid(0x13)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoAdd build_assert to fix debug build error
Steven Seungcheol Lee [Fri, 4 Mar 2022 07:05:32 +0000 (16:05 +0900)]
Add build_assert to fix debug build error

../ccan/ccan/str/str.h:169:10: fatal error: ccan/build_assert/build_assert.h: No such file or directory
  169 | #include <ccan/build_assert/build_assert.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agocmds-main: Add intel plugin commands
Arunpandian J [Fri, 4 Mar 2022 02:52:24 +0000 (08:22 +0530)]
cmds-main: Add intel plugin commands

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agobuild: Update libnvme wrap v2.0-rc5
Daniel Wagner [Thu, 3 Mar 2022 18:46:24 +0000 (19:46 +0100)]
build: Update libnvme wrap

Update to v1.0-rc5 of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1404 from igaw/update-tests
Daniel Wagner [Thu, 3 Mar 2022 18:44:06 +0000 (19:44 +0100)]
Merge pull request #1404 from igaw/update-tests

tests: Add support for linting and formatting of Python code

3 years agotests: Refresh Python code
Daniel Wagner [Thu, 3 Mar 2022 17:35:24 +0000 (18:35 +0100)]
tests: Refresh Python code

autopep3 and isort updated the code according the coding guidelines.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agotests: Add support for linting and formatting of Python code
Daniel Wagner [Thu, 3 Mar 2022 17:31:44 +0000 (18:31 +0100)]
tests: Add support for linting and formatting of Python code

Shamelessly steal the linting and formatting tooling for Python code
form python-sdbus. Update the documentation accordingly.

Link: https://github.com/python-sdbus/python-sdbus
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1359 from igaw/mention-subproject-update
Daniel Wagner [Thu, 3 Mar 2022 17:43:12 +0000 (18:43 +0100)]
Merge pull request #1359 from igaw/mention-subproject-update

README: Mention meson subprojects update

3 years agoREADME: Mention meson subprojects update
Daniel Wagner [Tue, 8 Feb 2022 15:30:41 +0000 (16:30 +0100)]
README: Mention meson subprojects update

New meson users are not aware of this rather nifty update
mechanism. Mention it in the README.

While at it also mention the library dependency.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1402 from sc108-lee/submit_io
Daniel Wagner [Thu, 3 Mar 2022 10:15:15 +0000 (11:15 +0100)]
Merge pull request #1402 from sc108-lee/submit_io

passthru bugfix

3 years agoMerge pull request #1401 from sc108-lee/meson
Daniel Wagner [Thu, 3 Mar 2022 09:44:22 +0000 (10:44 +0100)]
Merge pull request #1401 from sc108-lee/meson

meson: remove rpm dependencies when build as static

3 years agonvme: passthru bugfix(wrong jump, wrong file descriptor)
Steven Seungcheol Lee [Thu, 3 Mar 2022 09:08:47 +0000 (18:08 +0900)]
nvme: passthru bugfix(wrong jump, wrong file descriptor)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: remove unnecessary line from submit_io
Steven Seungcheol Lee [Thu, 3 Mar 2022 09:00:43 +0000 (18:00 +0900)]
nvme: remove unnecessary line from submit_io

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agomeson: remove rpm dependencies when build as static
Steven Seungcheol Lee [Thu, 3 Mar 2022 08:33:24 +0000 (17:33 +0900)]
meson: remove rpm dependencies when build as static

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1399 from igaw/traddr-case-insesitive
Daniel Wagner [Wed, 2 Mar 2022 07:46:42 +0000 (08:46 +0100)]
Merge pull request #1399 from igaw/traddr-case-insesitive

nvme-cli: Ignore traddr case

3 years agoMerge pull request #1400 from Arunpandian15/cmds_main_2
Daniel Wagner [Wed, 2 Mar 2022 07:43:18 +0000 (08:43 +0100)]
Merge pull request #1400 from Arunpandian15/cmds_main_2

cmds-main: Add all the admin, NVM commands in main commands list

3 years agocmds-main: Add all the admin, NVM commands in main commands list
Arunpandian J [Wed, 2 Mar 2022 04:00:30 +0000 (09:30 +0530)]
cmds-main: Add all the admin, NVM commands in main commands list

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agonvme-cli: Ignore traddr case
Daniel Wagner [Tue, 1 Mar 2022 15:10:25 +0000 (16:10 +0100)]
nvme-cli: Ignore traddr case

There was is no requirement in the NVME-FC specification that traddr
needs to be upper or lower case. Given the case difference, the
connect-all fails the match logic. Switch to strcasecmp for a
case insensitive compare.

Based on 1264c6323937 ("nvme-cli: Make connect-all matching be case
insensitive")

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1398 from martin-gpy/telemetry_error_crash
Daniel Wagner [Tue, 1 Mar 2022 12:38:11 +0000 (13:38 +0100)]
Merge pull request #1398 from martin-gpy/telemetry_error_crash

nvme: fix segfault in nvme telemetry-log error handling

3 years agonvme: fix segfault in nvme telemetry-log error handling
Martin George [Tue, 1 Mar 2022 11:52:36 +0000 (17:22 +0530)]
nvme: fix segfault in nvme telemetry-log error handling

After the upgrade to libnvme, the nvme telemetry-log command
segfaults for error scenarios as shown below:

NVMe status: Invalid Log Page: The log page indicated is invalid(0x4009)
Failed to acquire telemetry log 16393!
Segmentation fault (core dumped)

Freeing the telemetry log page header for error scenarios is already
handled in the libnvme. So avoid freeing this again here, which led to
this segfault.

Signed-off-by: Martin George <marting@netapp.com>
3 years agoMerge pull request #1397 from Arunpandian15/nvme_txt_01
Daniel Wagner [Tue, 1 Mar 2022 09:10:39 +0000 (10:10 +0100)]
Merge pull request #1397 from Arunpandian15/nvme_txt_01

cmds-main: Add media unit status log and supported capacity config list log pages in main commands list

3 years agocmds-main: Add media unit status log and supported capacity config list log pages...
Arunpandian J [Tue, 1 Mar 2022 08:13:05 +0000 (13:43 +0530)]
cmds-main: Add media unit status log and supported capacity config list log pages in main commands list

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1395 from igaw/port-dsc-kato
Daniel Wagner [Tue, 1 Mar 2022 08:00:55 +0000 (09:00 +0100)]
Merge pull request #1395 from igaw/port-dsc-kato

fabrics: ensure zero kato for non-persistent controllers

3 years agofabrics: ensure zero kato for non-persistent controllers
Daniel Wagner [Fri, 25 Feb 2022 12:57:05 +0000 (13:57 +0100)]
fabrics: ensure zero kato for non-persistent controllers

Add a helper function that sets the default kato value for the
discovery controllers. Along with ensuring a non-zero kato value
(i.e. NVMF_DEF_DISC_TMO) is passed to a persistent discovery
controller, it also ensures a zero kato value is passed to a
non-persistent discovery controller, as mandated by the NVMe spec.

Signed-off-by: Martin George <marting@netapp.com>
[dwagner: ported from monolithic branch]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Use boolean type for docs-build default v2.0-rc4
Daniel Wagner [Tue, 22 Feb 2022 17:25:01 +0000 (18:25 +0100)]
build: Use boolean type for docs-build default

muon complains about the type used for the default value. As it a
boolean type use a boolean as value instead of a string value.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Tue, 22 Feb 2022 17:23:03 +0000 (18:23 +0100)]
build: Update libnvme wrap

Update to v1.0-rc4 of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1393 from igaw/fix-intel-nvme-compile-bug
Daniel Wagner [Tue, 22 Feb 2022 14:49:07 +0000 (15:49 +0100)]
Merge pull request #1393 from igaw/fix-intel-nvme-compile-bug

intel: Workaround initializer element is not constant

3 years agoMerge pull request #1392 from martin-gpy/ontap_free_nsdescs
Daniel Wagner [Tue, 22 Feb 2022 14:19:10 +0000 (15:19 +0100)]
Merge pull request #1392 from martin-gpy/ontap_free_nsdescs

netapp-nvme: free the nsdescs pointer after use

3 years agoMerge pull request #1391 from Arunpandian15/doc_21
Daniel Wagner [Tue, 22 Feb 2022 14:06:50 +0000 (15:06 +0100)]
Merge pull request #1391 from Arunpandian15/doc_21

parser: Streamline documentation

3 years agointel: Workaround initializer element is not constant
Daniel Wagner [Tue, 22 Feb 2022 09:21:29 +0000 (10:21 +0100)]
intel: Workaround initializer element is not constant

Older gcc do not like the constant initializer expression in the intel
plugin:

../plugins/intel/intel-nvme.c: In function ‘lat_stats_log_scale’:
../plugins/intel/intel-nvme.c:662:47: error: initializer element is not constant
  static const int LATENCY_STATS_V4_BASE_VAL = (

Use defines as workaround.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonetapp-nvme: free the nsdescs pointer after use
Martin George [Tue, 22 Feb 2022 07:39:39 +0000 (13:09 +0530)]
netapp-nvme: free the nsdescs pointer after use

Ensure the nsdescs pointer is freed after use in
netapp_ontapdevices_get_info().

Fixes: 476d019 ("netapp-nvme: fix nvme ns desc uuid handling
for ontapdevices")

Signed-off-by: Martin George <marting@netapp.com>
3 years agoparser: Streamline documentation
Arunpandian J [Tue, 22 Feb 2022 03:21:45 +0000 (08:51 +0530)]
parser: Streamline documentation

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1388 from martin-gpy/get_ns_id_status
Daniel Wagner [Mon, 21 Feb 2022 11:09:47 +0000 (12:09 +0100)]
Merge pull request #1388 from martin-gpy/get_ns_id_status

nvme: get_ns_id command fails on nvme device

3 years agoMerge pull request #1390 from martin-gpy/json_simple_list_crash
Daniel Wagner [Mon, 21 Feb 2022 11:01:06 +0000 (12:01 +0100)]
Merge pull request #1390 from martin-gpy/json_simple_list_crash

nvme-print: fix 'nvme list -o json' segfault

3 years agonvme-print: fix 'nvme list -o json' segfault
Martin George [Mon, 21 Feb 2022 10:17:24 +0000 (15:47 +0530)]
nvme-print: fix 'nvme list -o json' segfault

After the recent upgrade to libnvme, 'nvme list -o json' segfaults
due to incorrect json object type passed here. So fix this by passing
the appropriate json object type and invoking it outside the
nvme_for_each_host loop.

Signed-off-by: Martin George <marting@netapp.com>
3 years agonvme: get_ns_id command fails on nvme device
Martin George [Mon, 21 Feb 2022 05:09:14 +0000 (10:39 +0530)]
nvme: get_ns_id command fails on nvme device

The get-ns-id command currently prints the perror status for a
given nvme device rather than its nsid. Fix this by properly
checking the return status of the nvme_get_nsid() function.

Signed-off-by: Martin George <marting@netapp.com>
3 years agoMerge pull request #1386 from AkhileshRN/SN_telemetry_type_desc
Daniel Wagner [Fri, 18 Feb 2022 13:51:55 +0000 (14:51 +0100)]
Merge pull request #1386 from AkhileshRN/SN_telemetry_type_desc

updated products list for telemetry (--type) argument in the wdc vs-internal-log command

3 years agowdc: updated products list for telemetry (--type) argument
Akhilesh RN [Fri, 18 Feb 2022 13:22:52 +0000 (18:52 +0530)]
wdc: updated products list for telemetry (--type) argument

Updated products list for telemetry (--type) argument in the wdc
vs-internal-log command.

3 years agoMerge pull request #1385 from nobodyatandnothing/patch-1
Daniel Wagner [Fri, 18 Feb 2022 13:50:07 +0000 (14:50 +0100)]
Merge pull request #1385 from nobodyatandnothing/patch-1

fix typo

3 years agodocs: fix typo in Data Set Management section
nobodyatandnothing [Fri, 18 Feb 2022 04:35:11 +0000 (23:35 -0500)]
docs: fix typo in Data Set Management section