]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
3 years agoMerge pull request #1460 from Arunpandian15/tests_lba
Daniel Wagner [Fri, 1 Apr 2022 10:07:50 +0000 (12:07 +0200)]
Merge pull request #1460 from Arunpandian15/tests_lba

tests: Add test for get lba status command

3 years agoMerge pull request #1457 from 0xRZ/nvme_copy_fix
Daniel Wagner [Fri, 1 Apr 2022 10:04:35 +0000 (12:04 +0200)]
Merge pull request #1457 from 0xRZ/nvme_copy_fix

nvme-copy: add missing field to the command

3 years agoMerge pull request #1453 from igaw/pdc-force
Daniel Wagner [Thu, 31 Mar 2022 18:46:16 +0000 (20:46 +0200)]
Merge pull request #1453 from igaw/pdc-force

fabrics: Introduce force flag to overwrite persistence logic

3 years agofabrics: Introduce force flag to overwrite persistence logic
Daniel Wagner [Thu, 24 Mar 2022 18:27:01 +0000 (19:27 +0100)]
fabrics: Introduce force flag to overwrite persistence logic

The persistence flag will be overwritten by the built in logic. Allow
the user to overwrite this by providing a force command line option.

While at it make the 'discover_from_config_file' path behave as the
'nvmf_discover' path. The idea here is that whenever a matching
persistent discovery controller is present just use this one. Only
create a new discovery controller when none matching found or
we are asked to do so via --force.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Free non-matching controller during discovery
Daniel Wagner [Mon, 28 Mar 2022 11:42:44 +0000 (13:42 +0200)]
fabrics: Free non-matching controller during discovery

Release all resources for the non-matching controller.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1466 from hreinecke/ns-filter-fix
Hannes Reinecke [Thu, 31 Mar 2022 12:52:29 +0000 (14:52 +0200)]
Merge pull request #1466 from hreinecke/ns-filter-fix

nvme: Fixup namespace filtering yet again

3 years agonvme: Fixup namespace filtering yet again
Hannes Reinecke [Thu, 31 Mar 2022 12:34:19 +0000 (14:34 +0200)]
nvme: Fixup namespace filtering yet again

strcmp() is tricky, so rather check for something with a given
length.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1464 from hreinecke/nvme-config
Hannes Reinecke [Thu, 31 Mar 2022 07:23:31 +0000 (09:23 +0200)]
Merge pull request #1464 from hreinecke/nvme-config

Add 'nvme config' command

3 years agofabrics: add 'nvme config' command
Hannes Reinecke [Wed, 30 Mar 2022 10:04:16 +0000 (12:04 +0200)]
fabrics: add 'nvme config' command

Add a command to display and modify the JSON configuration.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Update libnvme.wrap
Hannes Reinecke [Wed, 30 Mar 2022 06:29:08 +0000 (08:29 +0200)]
build: Update libnvme.wrap

Get "fabrics: add 'nvmf_update_config()'" from upstream.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1463 from hreinecke/meson-stringify
Hannes Reinecke [Wed, 30 Mar 2022 07:33:41 +0000 (09:33 +0200)]
Merge pull request #1463 from hreinecke/meson-stringify

fabrics: Correctly stringify discovery.conf and config.json paths

3 years agofabrics: Correctly stringify discovery.conf and config.json paths
Hannes Reinecke [Wed, 30 Mar 2022 07:20:43 +0000 (09:20 +0200)]
fabrics: Correctly stringify discovery.conf and config.json paths

The C preprocessor will not evaluate tokens in strings.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1462 from igaw/fix-argconfig-parser-opt-flag
Daniel Wagner [Tue, 29 Mar 2022 11:10:01 +0000 (13:10 +0200)]
Merge pull request #1462 from igaw/fix-argconfig-parser-opt-flag

argconfig: Do not use default value loading by getopt_long_only

3 years agoargconfig: Rename CFG_NONE to CFG_FLAG
Daniel Wagner [Tue, 29 Mar 2022 10:02:43 +0000 (12:02 +0200)]
argconfig: Rename CFG_NONE to CFG_FLAG

CFG_NONE is used to for OPT_FLAG. All other OPT_ macros have the
matching CFG_ enum. Let's rename CFG_NONE to CFG_FLAG to match and
make it consistent.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoplugins: Use type bool for OPT_FLAG
Daniel Wagner [Tue, 29 Mar 2022 09:58:29 +0000 (11:58 +0200)]
plugins: Use type bool for OPT_FLAG

We switched the arg parser over to using the bool type for
OPT_FLAG. Update all OPT_FLAG user to new type.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Use type bool for OPT_FLAG
Daniel Wagner [Tue, 29 Mar 2022 09:35:15 +0000 (11:35 +0200)]
nvme: Use type bool for OPT_FLAG

We switched the arg parser over to using the bool type for
OPT_FLAG. Update all OPT_FLAG user to new type.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoargconfig: Do not use default value loading by getopt_long_only
Daniel Wagner [Mon, 28 Mar 2022 18:24:21 +0000 (20:24 +0200)]
argconfig: Do not use default value loading by getopt_long_only

getopt_long_only() is able to load the default values directly. Though
the type has to be 'int'. If the target type of argument not 'int'
getopt_long_only will overwrite adjacent memory location.

Reduce the complexity by not using this feature.

Instead use the type bool because libnvme uses bool in 'struct
nvme_fabrics_config'.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1461 from hreinecke/filter-ns
Hannes Reinecke [Tue, 29 Mar 2022 10:00:23 +0000 (12:00 +0200)]
Merge pull request #1461 from hreinecke/filter-ns

nvme: use filter for 'list-subsys <devname>'

3 years agonvme: use filter for 'list-subsys <devname>'
Hannes Reinecke [Tue, 29 Mar 2022 08:57:04 +0000 (10:57 +0200)]
nvme: use filter for 'list-subsys <devname>'

When a device name is specified for 'nvme list-subsys' we should
be printing out only those parts of the tree which relate to the
specified device name, not the entire tree.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Update libnvme.wrap
Hannes Reinecke [Tue, 29 Mar 2022 09:54:50 +0000 (11:54 +0200)]
build: Update libnvme.wrap

Get 'tree: do not return error when filtering out subsystems' from
upstream.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Add nvme_get_lba_status_test in tests list
Arunpandian J [Tue, 29 Mar 2022 07:59:28 +0000 (13:29 +0530)]
build: Add nvme_get_lba_status_test in tests list

updated test list in meson.build with newly added
test nvme_get_lba_status_test

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agotests: Add test for get lba status command
Arunpandian J [Tue, 29 Mar 2022 07:56:52 +0000 (13:26 +0530)]
tests: Add test for get lba status command

test added for get lba status command

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agobuild: Add missing comma to file list in tests meson.build
Daniel Wagner [Mon, 28 Mar 2022 12:34:14 +0000 (14:34 +0200)]
build: Add missing comma to file list in tests meson.build

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1454 from Arunpandian15/tests_lba
Daniel Wagner [Mon, 28 Mar 2022 11:31:49 +0000 (13:31 +0200)]
Merge pull request #1454 from Arunpandian15/tests_lba

tests: Add tests for lba status log page

3 years agonvme-copy: add missing field to the command
Dmitry Tikhov [Sun, 27 Mar 2022 20:01:25 +0000 (23:01 +0300)]
nvme-copy: add missing field to the command

3 years agoMerge pull request #1452 from bjpaupor/lbstm
Daniel Wagner [Fri, 25 Mar 2022 14:45:02 +0000 (15:45 +0100)]
Merge pull request #1452 from bjpaupor/lbstm

Add lbstm option to create-ns

3 years agoAdd lbstm option to create-ns
Brandon Paupore [Tue, 22 Mar 2022 14:14:46 +0000 (09:14 -0500)]
Add lbstm option to create-ns

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Fri, 25 Mar 2022 14:41:37 +0000 (15:41 +0100)]
build: Update libnvme wrap

Get 'Add lbstm support for create-ns' changes from libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Include nvme_lba_status_log_test in meson.build
Arunpandian J [Fri, 25 Mar 2022 12:13:30 +0000 (17:43 +0530)]
build: Include nvme_lba_status_log_test in meson.build

updated meson.build file with nvme_lba_status_log_test

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agotests: Add tests for lba status log page
Arunpandian J [Fri, 25 Mar 2022 12:06:00 +0000 (17:36 +0530)]
tests: Add tests for lba status log page

Added test case for lba status log page

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1450 from Arunpandian15/tests_21_03
Daniel Wagner [Fri, 25 Mar 2022 08:52:13 +0000 (09:52 +0100)]
Merge pull request #1450 from Arunpandian15/tests_21_03

nvme_smart_log_test: call smart log for all ns based on LPA

3 years agonvme_smart_log_test: call smart log for all ns based on LPA
Arunpandian J [Fri, 25 Mar 2022 03:29:48 +0000 (08:59 +0530)]
nvme_smart_log_test: call smart log for all ns based on LPA

added check condition to check LPA value
before calling smart log for all namespace.

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agonvme_test: Add supp_check_id_ctrl wrapper for support check
Arunpandian J [Fri, 25 Mar 2022 03:23:54 +0000 (08:53 +0530)]
nvme_test: Add supp_check_id_ctrl wrapper for support check

added supp_check_id_ctrl wrapper to check support
based on passed key value to make it generic.

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1449 from Arunpandian15/tests_21_03
Daniel Wagner [Mon, 21 Mar 2022 14:48:59 +0000 (15:48 +0100)]
Merge pull request #1449 from Arunpandian15/tests_21_03

tests: print log info in next line

3 years agoMerge pull request #1448 from martin-gpy/print_disc_async_event
Daniel Wagner [Mon, 21 Mar 2022 14:44:31 +0000 (15:44 +0100)]
Merge pull request #1448 from martin-gpy/print_disc_async_event

nvme-print: print discovery async event support

3 years agotests: print log info in next line
Arunpandian J [Mon, 21 Mar 2022 10:09:13 +0000 (15:39 +0530)]
tests: print log info in next line

printing log info as looks as below
nvme_fw_log_test.TestNVMeFwLogCmd.test_fw_log ...
Firmware Log for device:nvme0
afi  : 0x1
frs1 : xxxxxxx

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agonvme-print: print discovery async event support
Martin George [Sat, 19 Mar 2022 11:51:49 +0000 (17:21 +0530)]
nvme-print: print discovery async event support

Print the discovery log page change notices async event support
in nvme_feature_show_fields().

Signed-off-by: Martin George <marting@netapp.com>
3 years agobuild: Update libnvme wrap v2.0-rc7
Daniel Wagner [Fri, 18 Mar 2022 17:00:28 +0000 (18:00 +0100)]
build: Update libnvme wrap

Update to v1.0-rc7 of libnvme.

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

Prepare for next release candiate.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1442 from igaw/bring-back-dev
Daniel Wagner [Fri, 18 Mar 2022 16:02:04 +0000 (17:02 +0100)]
Merge pull request #1442 from igaw/bring-back-dev

nvme: Print full device path

3 years agoMerge pull request #1445 from martin-gpy/eseries_json_segfault
Daniel Wagner [Fri, 18 Mar 2022 09:09:30 +0000 (10:09 +0100)]
Merge pull request #1445 from martin-gpy/eseries_json_segfault

netapp-nvme: fix smdevices segfault in json output

3 years agonetapp-nvme: fix smdevices segfault in json output
Martin George [Fri, 18 Mar 2022 08:21:06 +0000 (13:51 +0530)]
netapp-nvme: fix smdevices segfault in json output

After the upgrade to libnvme, the NetApp plugin for smdevices
segfaults due to the wrong json object type as shown below:

nvme: json_object.c:1194: json_object_array_add:
Assertion `json_object_get_type(jso) == json_type_array' failed.
Aborted (core dumped)

Fix this by passing the appropriate json array type for smdevices.
Also include a couple of minor changes as well - add a newline to
the end of the json output, and then free the json root device.

Signed-off-by: Martin George <marting@netapp.com>
Tested-by: Clayton Skaggs <claytons@netapp.com>
3 years agofabrics: keep the backward compatibility
Chaitanya Kulkarni [Fri, 18 Mar 2022 01:24:08 +0000 (18:24 -0700)]
fabrics: keep the backward compatibility

Don't print the message while disconnecting it is breaking blktests,
see below without this patch :-

nvme/005 (reset local loopback target)                       [failed]
    runtime  6.799s  ...  6.814s
    --- tests/nvme/005.out 2021-08-29 01:09:20.287901783 -0700
    +++ /mnt/data/blktests/results/nodev/nvme/005.out.bad 2022-03-17 18:11:16.198191553 -0700
    @@ -1,2 +1,3 @@
     Running nvme/005
    +Disconnected nvme1
     Test complete

With this patch :-

blktests (master) # ./check nvme/005
nvme/005 (reset local loopback target)                       [passed]
    runtime  6.807s  ...  6.801s

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Link: https://lore.kernel.org/r/20220318012408.24779-1-kch@nvidia.com
3 years agoMerge pull request #1443 from Arunpandian15/plugin_16
Daniel Wagner [Fri, 18 Mar 2022 07:49:38 +0000 (08:49 +0100)]
Merge pull request #1443 from Arunpandian15/plugin_16

cmd-plugins: Add ZNS plugin commands

3 years agoMerge pull request #1441 from sc108-lee/build
Daniel Wagner [Fri, 18 Mar 2022 07:48:48 +0000 (08:48 +0100)]
Merge pull request #1441 from sc108-lee/build

rpm: use meson configuration instead of default macros

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 agocmd-plugins: Add ZNS plugin commands
Arunpandian J [Fri, 18 Mar 2022 03:39:49 +0000 (09:09 +0530)]
cmd-plugins: Add ZNS plugin commands

updated cmd-plugins.txt file with ZNS commands.

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoDocumentation: Fix typo in command description
Arunpandian J [Fri, 18 Mar 2022 03:36:12 +0000 (09:06 +0530)]
Documentation: Fix typo in command description

updated nvme-zns-id-ns command description from
Identify controller to Identify Namespace.

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agorpm: use meson configuration instead of default macros
Steven Seungcheol Lee [Thu, 17 Mar 2022 12:23:44 +0000 (21:23 +0900)]
rpm: use meson configuration instead of default macros

meson:
remove unused variables (libdir, includedir, bindir)
add configuration data of installation directory

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
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 agonvme: Print full device path
Daniel Wagner [Thu, 17 Mar 2022 13:22:55 +0000 (14:22 +0100)]
nvme: Print full device path

Restore nvme-cli 1.x behavior to print the full path to the device
file. We assume that the devtmpfs is mounted under /dev which is the
case for any systemd based distro and a de-facto standard.

But SPDK users see their device populated under /dev/spdk have their
device file appear. So instead blindly prefix /dev do a stat to check
if the file exist.

If our educated guesses fail, don't add the full path. This should be
really a corner case and as long no one complains don't overengineer.

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)