]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
3 years agomeson: Install udev rules to /usr/lib
Morten Linderud [Sat, 9 Apr 2022 11:51:21 +0000 (13:51 +0200)]
meson: Install udev rules to /usr/lib

Signed-off-by: Morten Linderud <morten@linderud.pw>
3 years agodoc: Regenerate all documentation v2.0
Daniel Wagner [Fri, 8 Apr 2022 16:50:16 +0000 (18:50 +0200)]
doc: Regenerate all documentation

Prepare for first release of the 2.0 major version.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodocs: Fix title for ocp plugin commands
Daniel Wagner [Fri, 8 Apr 2022 16:47:59 +0000 (18:47 +0200)]
docs: Fix title for ocp plugin commands

asciidoc complains due to correct title markdown.

  asciidoc: FAILED: manpage document title is mandatory

While at it also stream line the documention slightly.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Fri, 8 Apr 2022 16:42:04 +0000 (18:42 +0200)]
build: Update libnvme wrap

Update to v1.0 of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update zlib wrap
Daniel Wagner [Fri, 8 Apr 2022 16:39:19 +0000 (18:39 +0200)]
build: Update zlib wrap

Update to zlib-1.2.12

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1490 from igaw/connect_unique_ctrl
Daniel Wagner [Fri, 8 Apr 2022 15:48:43 +0000 (17:48 +0200)]
Merge pull request #1490 from igaw/connect_unique_ctrl

Create persistent controller using unique subsystem NQN

3 years agofabrics: Create persistent controller using unique subsystem NQN
Daniel Wagner [Fri, 8 Apr 2022 15:21:07 +0000 (17:21 +0200)]
fabrics: Create persistent controller using unique subsystem NQN

Prefer unique subsystem NQN discovery controllers over well-known
subsystem NQN when a persistent controller is created.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Refactor discover controller creation
Daniel Wagner [Fri, 8 Apr 2022 14:19:39 +0000 (16:19 +0200)]
fabrics: Refactor discover controller creation

Move the discover controller creation code into one place.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Refactor argument passing for transport configuration
Daniel Wagner [Fri, 8 Apr 2022 13:23:41 +0000 (15:23 +0200)]
fabrics: Refactor argument passing for transport configuration

We passing all the attributes of the transport configuration
individually. Group them together to reduce the number of arguments
one has to pass into the functions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Set default trsvcid before lookups and match
Daniel Wagner [Fri, 8 Apr 2022 13:42:52 +0000 (15:42 +0200)]
fabrics: Set default trsvcid before lookups and match

Set the default trsvcid before trying to lookup or match against
existing persistent discovery controllers.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1489 from igaw/fix-persistent-kato-tmo2
Daniel Wagner [Fri, 8 Apr 2022 15:41:45 +0000 (17:41 +0200)]
Merge pull request #1489 from igaw/fix-persistent-kato-tmo2

fabrics: Set KATO for discovery controller when connecting

3 years agoMerge pull request #1488 from igaw/fix-discover-argument
Daniel Wagner [Fri, 8 Apr 2022 15:36:27 +0000 (17:36 +0200)]
Merge pull request #1488 from igaw/fix-discover-argument

fabrics: Switch connect and persistent argument for __disover

3 years agofabrics: Set KATO for discovery controller when connecting
Daniel Wagner [Fri, 8 Apr 2022 12:08:47 +0000 (14:08 +0200)]
fabrics: Set KATO for discovery controller when connecting

In case we are connecting to the discovered controllers we should also
set the KATO value for persistent discocovery controllers correctly.

Unfortunatly, the compiler seems to get confused by only conditionally
setting tmo and warns about uninitialized variable. Hence we always
store and restore keep_alive_tmo.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Do no modify default config for discovery controller
Daniel Wagner [Fri, 8 Apr 2022 11:58:01 +0000 (13:58 +0200)]
fabrics: Do no modify default config for discovery controller

When a discovery controller is setup we are currently modifying the
default config. As this configuration might also be used for normal
I/O controllers don't modify it permanently.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Refactor discover controller setup
Daniel Wagner [Fri, 8 Apr 2022 11:32:21 +0000 (13:32 +0200)]
fabrics: Refactor discover controller setup

Move the setup of the discovery controller into a helper
function. This in preperation for handling KATO value updates
centrally.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1485 from igaw/scan-filter-update
Daniel Wagner [Thu, 7 Apr 2022 15:43:13 +0000 (17:43 +0200)]
Merge pull request #1485 from igaw/scan-filter-update

nvme: update to nvme_scan_filter_t modifications

3 years agoMerge pull request #1486 from jeffreyalien/master
Daniel Wagner [Thu, 7 Apr 2022 14:46:58 +0000 (16:46 +0200)]
Merge pull request #1486 from jeffreyalien/master

build: Update meson tips in README.md

3 years agonvme: update to nvme_scan_filter_t modifications
Hannes Reinecke [Wed, 6 Apr 2022 13:24:20 +0000 (15:24 +0200)]
nvme: update to nvme_scan_filter_t modifications

The scan filter in libnvme has been updated, so update the code
to make use of it.

Signed-off-by: Hannes Reinecke <hare@suse.de>
[dwagner: list also the paths for non multipath namespaces]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Wed, 6 Apr 2022 12:37:51 +0000 (14:37 +0200)]
build: Update libnvme wrap

Get the changes in the filter API and the removal of
ctrl_get_ana_state.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1483 from tbzatek/sysfs-fixes-2
Daniel Wagner [Thu, 7 Apr 2022 08:05:03 +0000 (10:05 +0200)]
Merge pull request #1483 from tbzatek/sysfs-fixes-2

nvme-print: Fix json array object instantiation

3 years agonvme-print: Fix json array object instantiation
Tomas Bzatek [Tue, 22 Mar 2022 14:56:32 +0000 (15:56 +0100)]
nvme-print: Fix json array object instantiation

In the case of multiple hosts records the array objects
gets corrupted.

3 years agoMerge pull request #1484 from wubo009/master
Daniel Wagner [Thu, 7 Apr 2022 07:24:44 +0000 (09:24 +0200)]
Merge pull request #1484 from wubo009/master

Fix memory leak when nvme_scan_toplopy return failed

3 years agoMerge pull request #1405 from arthurshau/add/ocp-plugin
Daniel Wagner [Thu, 7 Apr 2022 07:16:45 +0000 (09:16 +0200)]
Merge pull request #1405 from arthurshau/add/ocp-plugin

Add new OCP plugin

3 years agoFix memory leak when nvme_scan_toplopy return failed
Wu Bo [Thu, 7 Apr 2022 06:50:26 +0000 (14:50 +0800)]
Fix memory leak when nvme_scan_toplopy return failed

3 years agodoc: Add doc files for new ocp plugin commands
Arthur Shau [Wed, 6 Apr 2022 22:45:20 +0000 (15:45 -0700)]
doc: Add doc files for new ocp plugin commands

3 years agoAdd new OCP plugin
Arthur Shau [Thu, 3 Mar 2022 22:08:15 +0000 (14:08 -0800)]
Add new OCP plugin
New OCP plugin that consolidates some of the functionality from the other vendor plugins. For now, implements getting of C0 and C3 log pages.

Signed-off-by: Arthur Shau <arthurshau@fb.com>
Signed-off-by: Wei Zhang <wzhang@fb.com>
Signed-off-by: Venkat Ramesh <venkatraghavan@fb.com>
3 years agobuild: Update meson tips in README.md
Jeff Lien [Wed, 6 Apr 2022 19:35:42 +0000 (14:35 -0500)]
build: Update meson tips in README.md

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1480 from igaw/fix-default-ports
Daniel Wagner [Wed, 6 Apr 2022 14:42:06 +0000 (16:42 +0200)]
Merge pull request #1480 from igaw/fix-default-ports

fabrics: Set default trsvcid ports for TCP and RDMA

3 years agoMerge pull request #1474 from hreinecke/intel-json
Daniel Wagner [Wed, 6 Apr 2022 08:38:40 +0000 (10:38 +0200)]
Merge pull request #1474 from hreinecke/intel-json

plugins/intel: make 'buckets' a json array

3 years agoMerge pull request #1471 from jeffreyalien/OCP-2.0-final
Daniel Wagner [Mon, 4 Apr 2022 16:03:11 +0000 (18:03 +0200)]
Merge pull request #1471 from jeffreyalien/OCP-2.0-final

WDC plugin changes to support OCP 2.0 Spec

3 years agofabrics: Set default trsvcid ports for TCP and RDMA
Daniel Wagner [Mon, 4 Apr 2022 15:46:11 +0000 (17:46 +0200)]
fabrics: Set default trsvcid ports for TCP and RDMA

libnvme doesn't know at controller creation if the new controller is
going to be discovery controller. But nvme-cli knows it, so just set
defaults on the caller level.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1478 from igaw/fix-empty-hostnqn-file
Daniel Wagner [Mon, 4 Apr 2022 11:34:25 +0000 (13:34 +0200)]
Merge pull request #1478 from igaw/fix-empty-hostnqn-file

fabrics: Do not free static string

3 years agofabrics: Do not free static string
Daniel Wagner [Mon, 4 Apr 2022 10:48:55 +0000 (12:48 +0200)]
fabrics: Do not free static string

38f5a54a7306 ("fabrics: Support connect even when no /etc/nvme/hostnqn
file exists") introduce a regression. arg_parser() might assign a
static string to hostnqn and/or hostid. Can't free this.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Switch connect and persistent argument for __disover
Daniel Wagner [Mon, 4 Apr 2022 10:28:43 +0000 (12:28 +0200)]
fabrics: Switch connect and persistent argument for __disover

The order of the connect and persistent argument for the recursive
call to __discover is in the wrong order:

  __discover(.., bool connect, bool persistent, enum nvme_print_flags flags)

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1477 from igaw/fix-empty-hostnqn-file
Daniel Wagner [Mon, 4 Apr 2022 10:11:59 +0000 (12:11 +0200)]
Merge pull request #1477 from igaw/fix-empty-hostnqn-file

fabrics: Support connect even when no /etc/nvme/hostnqn file exists

3 years agofabrics: Support connect even when no /etc/nvme/hostnqn file exists
Daniel Wagner [Mon, 4 Apr 2022 09:56:15 +0000 (11:56 +0200)]
fabrics: Support connect even when no /etc/nvme/hostnqn file exists

The connect call will fail if there is no /etc/nvme/hostnqn file
available. The 1.x version did have a fallback mechanisme in place
when the config file was missing.

Let's add this feature back by calling nvmf_hostnqn_generate() when
there is no /etc/nvme/hostnqn file.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoplugins/intel: make 'buckets' a json array
Hannes Reinecke [Mon, 4 Apr 2022 06:57:24 +0000 (08:57 +0200)]
plugins/intel: make 'buckets' a json array

The 'buckets' elements in the statistics output are an array, not
a list of (identically named) objects.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugin: Update WDC capabilities command with new commmands
Jeff Lien [Fri, 1 Apr 2022 21:15:05 +0000 (16:15 -0500)]
plugin: Update WDC capabilities command with new commmands

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agodocumentation: Add doc files for new wdc plugin commands
Jeff Lien [Wed, 30 Mar 2022 18:02:10 +0000 (13:02 -0500)]
documentation: Add doc files for new wdc plugin commands

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoplugin: Add new WDC plugin commands for OCP 2.0
Jeff Lien [Fri, 25 Mar 2022 15:41:38 +0000 (10:41 -0500)]
plugin: Add new WDC plugin commands for OCP 2.0
  Add command to display error recovery (id 0xC1) log page
  Add command to display device capabilities (id 0xC4) log page
  Add command to display unsupported requirements (id 0xC5) log page
  Update WDC plugin version to 1.16.4

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agobuild: Update libnvme wrap v2.0-rc8
Daniel Wagner [Fri, 1 Apr 2022 13:10:37 +0000 (15:10 +0200)]
build: Update libnvme wrap

Update to v1.0-rc8 of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodoc: Regenerate all documentation
Daniel Wagner [Fri, 1 Apr 2022 13:09:56 +0000 (15:09 +0200)]
doc: Regenerate all documentation

Prepare for next release candiate.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1468 from martin-belanger/dim-cmd
Daniel Wagner [Fri, 1 Apr 2022 12:38:15 +0000 (14:38 +0200)]
Merge pull request #1468 from martin-belanger/dim-cmd

fabrics: Add DIM command

3 years agoMerge pull request #1470 from hreinecke/config-fix
Hannes Reinecke [Fri, 1 Apr 2022 11:41:40 +0000 (13:41 +0200)]
Merge pull request #1470 from hreinecke/config-fix

build: Update libnvme.wrap

3 years agobuild: Update libnvme.wrap
Hannes Reinecke [Wed, 30 Mar 2022 06:29:08 +0000 (08:29 +0200)]
build: Update libnvme.wrap

Get "tree: always allocate config file in nvme_read_config()" from upstream.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agofabrics: Add DIM command
Martin Belanger [Fri, 1 Apr 2022 11:16:47 +0000 (07:16 -0400)]
fabrics: Add DIM command

TP8010 defines the DIM command (Discovery Information Management)
as a way to Register-with or Deregister-from a Discovery
Controller. This is used for NVMe-over-Fabrics when connecting to
Central Discovery Controllers (CDC).

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
3 years agoMerge pull request #1467 from rnaveentec/fix_spell
Daniel Wagner [Fri, 1 Apr 2022 10:31:48 +0000 (12:31 +0200)]
Merge pull request #1467 from rnaveentec/fix_spell

Fixed spelling for Partition

3 years agonvme-rpmb: Fix spelling for 'Partition'
naveen kumar [Thu, 31 Mar 2022 17:12:32 +0000 (22:42 +0530)]
nvme-rpmb: Fix spelling for 'Partition'

3 years agoMerge pull request #1455 from jeffreyalien/nvme-2.0
Daniel Wagner [Fri, 1 Apr 2022 10:29:49 +0000 (12:29 +0200)]
Merge pull request #1455 from jeffreyalien/nvme-2.0

Nvme 2.0 Changes

3 years agonvme-print: Add human readable print for nsattr field
Jeff Lien [Tue, 22 Mar 2022 20:44:18 +0000 (15:44 -0500)]
nvme-print: Add human readable print for nsattr field

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agonvme-print: Update Persistent Event log fields
Jeff Lien [Tue, 22 Mar 2022 20:08:57 +0000 (15:08 -0500)]
nvme-print: Update Persistent Event log fields

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agodocs: Add Documentation files for get_mi_cmd_support_effects_log
Jeff Lien [Tue, 22 Mar 2022 19:56:01 +0000 (14:56 -0500)]
docs: Add Documentation files for get_mi_cmd_support_effects_log

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agonvme: add get_mi_cmd_support_effects_log command
Jeff Lien [Tue, 22 Mar 2022 19:47:40 +0000 (14:47 -0500)]
nvme: add get_mi_cmd_support_effects_log command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
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>