]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
6 years agowdc: Add additional device for vs-internal-log
Dong Ho [Fri, 11 Jan 2019 00:37:09 +0000 (00:37 +0000)]
wdc: Add additional device for vs-internal-log

Add support for SN730 device to vs-internal-log.

Reviewed-by Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

6 years agowdc: Change device capability checking
Dong Ho [Fri, 11 Jan 2019 00:37:06 +0000 (00:37 +0000)]
wdc: Change device capability checking

Changes the way device VID and type are checked for compatibility
purposes. Other minor changes for command names, update the respective
documentation file names, and remove deprecated C1 log functionality.

6 years agonvme: Release 1.7 v1.7
Keith Busch [Fri, 11 Jan 2019 00:25:03 +0000 (17:25 -0700)]
nvme: Release 1.7

Thank you to all the contributions in this release. Lots of new options,
spec features, output updates, and bug fixes. Shortlog below.

Austin J Eberle (1):
      nvme-cli: prevent resv action field overflow

Benreese0 (1):
      nvme: Adding a block size selector to format

Chaitanya Kulkarni (23):
      nvme-cli: remove unnecessary assignments
      nvme-cli add ns write protect feature support
      nvme-cli: add minimal ana-log page support
      nvme-cli: add ana-log documentation
      nvme-cli: make show_registers_cap() static
      nvme-cli: wdc-plugin mark array static declaration
      nvme-cli: fix sparse warnings for declaration
      nvme-cli: don't use unsigned for fd in lnvm-nvme.c
      nvme-cli: remove always true condition for u8
      nvme-cli: fix dead-code nvmf log page discovery
      nvme-cli: code cleanup for passthru() handlers
      nvme-cli: fix scaandir() return value
      nvme-cli: use uniform error message for open
      nvme-cli: fix indentation
      nvme-cli: make wdc plug-in functions static
      nvme-cli: mark functions static
      nvme-cli: make malloc error handling uniform
      nvme-cli: fix indentation for dir_[send/receive]
      nvme-cli: make read error handling uniform
      nvme-cli: fix sanitize status endianness
      nvme-cli: fix ana-log endianness
      nvme-cli: fix array len to hold string of size 4
      nvme-cli: fix endianness for the structure field

Dan Bond (1):
      README: update Arch Linux install instructions

David Milburn (1):
      nvme-cli: report subsystem-reset not supported by controller

Dong Ho (6):
      nvme-cli: tests: fix fw_log test coding style
      nvme-cli: tests: fix id_ctrl test coding style
      nvme-cli: tests: fix id_ns test coding style
      nvme-cli: tests: Add get_id_ctrl function
      nvme-cli wdc plugin: Add get pfail dump command.
      nvme-cli wdc plugin: Add documentation for pfail dump.

Eyal Ben David (8):
      nvme-print.c : fix ns-descs JSON output
      nvme-get-property : Add documentation
      nvme-models.c - search for pci.ids
      nvme list : fix nvme list output if identify failed on device
      attach-ns : fix segfault for ctrl list wrong input
      nvme.spec.in : fix bash completion path, require
      Refactor plugins in a file hierarchy
      connect-all: special treatment to EALREADY afetr write to /dev/nvme-fabrics

Hannes Reinecke (13):
      nvme-ana-log: fixup compiler warning in show_ana_log()
      nvme-vendor: fixup c99 declaration in huawei plugin
      nvme-discover: sanitize options
      nvme-discover: Retry discovery log if the generation counter changes
      nvme-ioctl: retrieve log pages in 4k chunks
      nvme-discover: Re-check generation counter after log page transfer
      seagate-nvme: fixup coding style
      nvme-cli: Add 'rae' argument to nvme_get_log()
      nvme-cli: kill nvme_passthru_admin()
      nvme: fixup ANA group descriptor offset
      nvme: introduce get_nvme_ctrl_attr()
      nvme: print out controller state for 'list-subsys'
      nvme-list-subsys: Add device name argument and print out ANA state

Harry Mallon (3):
      micron-nvme: Replace direct use of ioctl
      Fix typos in docs
      Fix typos in tests and utils

Jeff Lien (1):
      nvme-cli: Fix the displayed metadata length value on Big Endian systems.

Jeffrey Lien (5):
      Add PCI device id checking for the WDC plugin commands.
      Fix nvme test device selection to use controller value defined in the config.json file. Before this fix, the value was hard coded to nvme0.
      NVMe-CLI WDC Plugin - Simplify the device id checking routines.
      nvme-cli: Add wdc-plugin command vs-internal-log and update wdc-plug cap-diag command with transfer-size parameter.
      nvme-cli: Add help text for wdc-plugin command vs-internal-log. Update help text for wdc-plugin command cap-diag.

Johannes Thumshirn (2):
      fabrics: write ctrl_loss_tmo to fabrics device on connect
      fabrics: write keep-alive-timeout to fabrics device on connect

Keith Busch (15):
      Fix print format specifier for 64-bit
      Fix nvme id namespace struct
      Regen documentation
      Update gitignore for generated test files
      Update documentation
      Re-gen documentation for new files
      wdc: Fix strncpy warning
      wdc: Use const string for suffix
      nvme: Handle supported capabilities result for get features
      list-subsys: Preserve line breaks and spaces
      Regen documentation
      nvme-cli: Don't print result on passthru error
      Update documentation
      nvme: Regenerate documentation
      nvme: Remove duplicate error message

M. Warner Losh (2):
      Initialize line.
      Use standard interfaces to get timezone offsets.

Minwoo Im (2):
      nvme-cli: fix typo in json_print_list_items
      nvme-cli: readme: fix typo in Alpine distro support

Morten Linderud (1):
      Added zsh completion installation

Narasimhan V (1):
      Use tnvmcap register for creating namespace

Peter Dave Hello (1):
      Enable code block syntax highlight in README.md

Ralph Corderoy (1):
      Enlarge local char[] so snprintf(3) can't truncate path.

Rami Rosen (2):
      nvme-cli: fix a typo
      nvme-cli: fix a typo

Sagi Grimberg (13):
      fabrics: make some arguments integers
      fabrics: don't fail empty discovery log page
      nvme: commonize subsystems info in a helper
      fabrics: add disconnect-all command
      fabrics: support fabrics sq flow control disable
      fabrics: use trtype_str when parsing a discovery log entry
      nvme: Add TCP transport
      fabrics: add tcp port tsas decoding
      fabrics: add transport header and data digest
      nvme-ioctl: clear rae for discovery log pages
      fabrics: pass in number of write queues
      fabrics: pass in number of polling queues
      fabrics: allow nr_io/write/poll_queues and queue size to discovery

Schremmer, Steven (1):
      nvme-cli: netapp plugin handle empty strings

Stefan Wiehler (1):
      Makefile: fix bash completion install path

Sushma Kalakota (1):
      Added support for virtualization-management command

Tal Shorer (1):
      don't execute a command if --dry-run is supplied

Warner Losh (7):
      Use sys/ioctl.h to pull in definitions.
      Remove unnecessary asm/byteorder.h
      Remove unnecessary linux/types.h include.
      Include libgen.h for basename prototype.
      Include sys/stat.h
      nvme-cli: remove endian.h
      nvme-cli: fix ioctl argument

Warner.Losh (1):
      We don't need to include linux/types.h here.

Yi Zhang (1):
      nvme-cli: print "\n" after nvme list-subsys -o json

beomsooo.kim (1):
      In json output, if the commands add zero length string, it occur allocation fail & abort (cannot display empty value)

chrono (1):
      Added gentoo to README.md

freezer5 (2):
      Fix printing of large ANAGRPID values
      Fix printing of large ANAGRPID values

jaredeh (1):
      timeout option added to ns_create/delete (#440)

lijie (2):
      nvme-cli:fix a typo in SELF-TEST log
      nvme-cli: fix a typo

puneet kandhari (1):
      Remove trailing "\n" so that the output is valid json

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agorpm spec file: add zsh completion (#447)
bdeyal [Thu, 10 Jan 2019 17:27:08 +0000 (19:27 +0200)]
rpm spec file: add zsh completion (#447)

6 years agonvme: Remove duplicate error message
Keith Busch [Wed, 9 Jan 2019 22:43:00 +0000 (15:43 -0700)]
nvme: Remove duplicate error message

Link: https://github.com/linux-nvme/nvme-cli/issues/446
Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agotimeout option added to ns_create/delete (#440)
jaredeh [Wed, 9 Jan 2019 18:33:57 +0000 (10:33 -0800)]
timeout option added to ns_create/delete (#440)

* adding timeout option to create namespace command

* Add --timeout to nvme_delete

6 years agoMerge branch 'benreese0-master'
Keith Busch [Wed, 9 Jan 2019 00:46:47 +0000 (17:46 -0700)]
Merge branch 'benreese0-master'

6 years agonvme: Regenerate documentation
Keith Busch [Wed, 9 Jan 2019 00:46:26 +0000 (17:46 -0700)]
nvme: Regenerate documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme: Adding a block size selector to format
Benreese0 [Tue, 8 Jan 2019 22:59:19 +0000 (14:59 -0800)]
nvme: Adding a block size selector to format

Provide format option to allow the user to specify desired block size
and have nvme-cli determine the correct LBAF.

Signed-off-by: Benjamin Reese <benjamin.reese@intel.com>
[changelog, minor formatting, shift lbaf instead of bs, reference id_ns
only if we read it]
Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agofabrics: allow nr_io/write/poll_queues and queue size to discovery
Sagi Grimberg [Tue, 8 Jan 2019 07:55:31 +0000 (23:55 -0800)]
fabrics: allow nr_io/write/poll_queues and queue size to discovery

The discovered controllers will inherit the arguments.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agoMerge pull request #444 from syscll/master
Keith Busch [Thu, 3 Jan 2019 16:18:43 +0000 (09:18 -0700)]
Merge pull request #444 from syscll/master

README: update Arch Linux install instructions

6 years agoREADME: update Arch Linux install instructions
Dan Bond [Thu, 3 Jan 2019 14:52:33 +0000 (14:52 +0000)]
README: update Arch Linux install instructions

6 years agoUpdate documentation
Keith Busch [Wed, 2 Jan 2019 15:59:55 +0000 (08:59 -0700)]
Update documentation

6 years agofabrics: pass in number of polling queues
Sagi Grimberg [Thu, 13 Dec 2018 06:10:52 +0000 (22:10 -0800)]
fabrics: pass in number of polling queues

nr_poll_queues specifies the number of additional queues that will
be connected for hosting polling latency critical I/O.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agofabrics: pass in number of write queues
Sagi Grimberg [Thu, 13 Dec 2018 06:07:49 +0000 (22:07 -0800)]
fabrics: pass in number of write queues

nr_write_queues specifies the number of additional queues that
will be connected. These queues will host write I/O (host to target
payload) while nr_io_queues will host read I/O (target to host payload).

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agoMerge pull request #439 from Sushmakk/nvme-cli_virtualization_cmd
Keith Busch [Wed, 2 Jan 2019 15:41:15 +0000 (08:41 -0700)]
Merge pull request #439 from Sushmakk/nvme-cli_virtualization_cmd

nvme-cli: Added support for virtualization-management command

6 years agoMerge pull request #441 from minwooim/v1.7/fix_typo_in_readme
Keith Busch [Wed, 2 Jan 2019 15:40:43 +0000 (08:40 -0700)]
Merge pull request #441 from minwooim/v1.7/fix_typo_in_readme

nvme-cli: readme: fix typo in Alpine distro support

6 years agoMerge pull request #442 from chron0/patch-1
Keith Busch [Fri, 28 Dec 2018 16:00:14 +0000 (09:00 -0700)]
Merge pull request #442 from chron0/patch-1

Added gentoo to README.md

6 years agoAdded gentoo to README.md
chrono [Sat, 22 Dec 2018 00:11:50 +0000 (00:11 +0000)]
Added gentoo to README.md

Working 1.6 build and functional output on current gentoo from mainline portage

6 years agonvme-cli: readme: fix typo in Alpine distro support
Minwoo Im [Tue, 18 Dec 2018 16:35:22 +0000 (01:35 +0900)]
nvme-cli: readme: fix typo in Alpine distro support

Fix typo 'akp' to 'apk'.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agonvme-cli: Don't print result on passthru error
Keith Busch [Mon, 17 Dec 2018 20:06:50 +0000 (13:06 -0700)]
nvme-cli: Don't print result on passthru error

The kernel doesn't copy CQE DW0 to the ioctl result on error, so don't
print it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoAdded support for virtualization-management command
Sushma Kalakota [Thu, 6 Dec 2018 20:30:13 +0000 (12:30 -0800)]
Added support for virtualization-management command

6 years agoMerge pull request #430 from Foxboron/foxboron/zsh-completion-make
Keith Busch [Thu, 13 Dec 2018 22:24:36 +0000 (15:24 -0700)]
Merge pull request #430 from Foxboron/foxboron/zsh-completion-make

Added zsh completion installation

6 years agoMerge pull request #436 from hjmallon/spelling
Keith Busch [Thu, 13 Dec 2018 22:24:22 +0000 (15:24 -0700)]
Merge pull request #436 from hjmallon/spelling

Fix a host of typos in utils, tests and docs

6 years agonvme-ioctl: clear rae for discovery log pages
Sagi Grimberg [Fri, 7 Dec 2018 22:05:30 +0000 (14:05 -0800)]
nvme-ioctl: clear rae for discovery log pages

The discovery controller should now be able to send
us discovery log change events so we need to clear the
rae bit for that.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agofabrics: add transport header and data digest
Sagi Grimberg [Tue, 3 Jul 2018 11:32:46 +0000 (14:32 +0300)]
fabrics: add transport header and data digest

This setting is enabling header and data digest over NVMe/TCP
controllers.

Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
6 years agofabrics: add tcp port tsas decoding
Sagi Grimberg [Thu, 24 May 2018 11:46:01 +0000 (14:46 +0300)]
fabrics: add tcp port tsas decoding

tcp tsas include sectype indication for unsecured/tls ports.

Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
6 years agonvme: Add TCP transport
Sagi Grimberg [Sun, 6 Nov 2016 18:38:52 +0000 (20:38 +0200)]
nvme: Add TCP transport

Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
6 years agofabrics: use trtype_str when parsing a discovery log entry
Sagi Grimberg [Tue, 20 Nov 2018 21:26:06 +0000 (13:26 -0800)]
fabrics: use trtype_str when parsing a discovery log entry

Reduce some code duplication.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agofabrics: support fabrics sq flow control disable
Sagi Grimberg [Thu, 24 May 2018 11:45:30 +0000 (14:45 +0300)]
fabrics: support fabrics sq flow control disable

If the discovery log entry indicates that the subsystem supports
disabling sq flow control, we ask the host to connect and disable sq
flow control (omit sq_head pointer updates). Also add a connect option
to explicitly ask for disable_sqflow.

If we failed to add_ctrl in connect-all command, we retry without it
to be backward compatible with a driver that cannot accept the new
flag.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agoMerge pull request #435 from hjmallon/micron
Keith Busch [Thu, 29 Nov 2018 15:06:49 +0000 (08:06 -0700)]
Merge pull request #435 from hjmallon/micron

micron-nvme: Replace direct use of ioctl

6 years agoFix typos in tests and utils
Harry Mallon [Thu, 29 Nov 2018 13:44:52 +0000 (13:44 +0000)]
Fix typos in tests and utils

6 years agoFix typos in docs
Harry Mallon [Thu, 29 Nov 2018 13:43:30 +0000 (13:43 +0000)]
Fix typos in docs

6 years agoFix printing of large ANAGRPID values
freezer5 [Thu, 22 Nov 2018 14:07:17 +0000 (16:07 +0200)]
Fix printing of large ANAGRPID values

6 years agomicron-nvme: Replace direct use of ioctl
Harry Mallon [Thu, 29 Nov 2018 13:10:02 +0000 (13:10 +0000)]
micron-nvme: Replace direct use of ioctl

6 years agoMerge pull request #433 from freezer5/patch-2
Keith Busch [Mon, 26 Nov 2018 15:45:44 +0000 (08:45 -0700)]
Merge pull request #433 from freezer5/patch-2

id-ns: Fix printing of large ANAGRPID values

6 years agoMerge pull request #431 from lightjd/master
Keith Busch [Mon, 26 Nov 2018 15:06:37 +0000 (08:06 -0700)]
Merge pull request #431 from lightjd/master

In json output, if there is zero length string in command return data, it occur allocation failure & abort (cannot display empty value)

6 years agoFix printing of large ANAGRPID values
freezer5 [Thu, 22 Nov 2018 14:07:17 +0000 (16:07 +0200)]
Fix printing of large ANAGRPID values

6 years agoIn json output, if the commands add zero length string, it occur allocation fail...
beomsooo.kim [Thu, 22 Nov 2018 04:08:42 +0000 (13:08 +0900)]
In json output, if the commands add zero length string, it occur allocation fail & abort (cannot display empty value)

6 years agoRegen documentation
Keith Busch [Fri, 16 Nov 2018 16:55:02 +0000 (09:55 -0700)]
Regen documentation

Update manpages with latest doc updates.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agolist-subsys: Preserve line breaks and spaces
Keith Busch [Fri, 16 Nov 2018 16:53:58 +0000 (09:53 -0700)]
list-subsys: Preserve line breaks and spaces

The manpage looked weird before. Make sure it preserves the desired format.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-list-subsys: Add device name argument and print out ANA state
Hannes Reinecke [Fri, 16 Nov 2018 07:35:01 +0000 (08:35 +0100)]
nvme-list-subsys: Add device name argument and print out ANA state

Update the 'nvme list-subsys' command to accept a device name and
print out the ANA state for all paths to that device.

Signed-off-by: Hannes Reinecke <hare@suse.com>
6 years agonvme: print out controller state for 'list-subsys'
Hannes Reinecke [Fri, 16 Nov 2018 07:35:00 +0000 (08:35 +0100)]
nvme: print out controller state for 'list-subsys'

Signed-off-by: Hannes Reinecke <hare@suse.com>
6 years agonvme: introduce get_nvme_ctrl_attr()
Hannes Reinecke [Fri, 16 Nov 2018 07:34:59 +0000 (08:34 +0100)]
nvme: introduce get_nvme_ctrl_attr()

Use a generic function 'get_nvme_ctrl_attr()' instead of coding
the same function for each sysfs attribute.

Signed-off-by: Hannes Reinecke <hare@suse.com>
6 years agonvme: fixup ANA group descriptor offset
Hannes Reinecke [Mon, 5 Nov 2018 15:00:36 +0000 (16:00 +0100)]
nvme: fixup ANA group descriptor offset

The ANA group descriptor offset changed between the specification
sent for ratification and the final ratified document, causing the
ANA log page not to be displayed correctly.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Steve Schremmer <steve.schremmer@netapp.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: fix a typo
lijie [Thu, 8 Nov 2018 13:23:17 +0000 (21:23 +0800)]
nvme-cli: fix a typo

This patch fixes a typo in nvme-cli usage text.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoAdded zsh completion installation
Morten Linderud [Wed, 7 Nov 2018 22:19:33 +0000 (23:19 +0100)]
Added zsh completion installation

Signed-off-by: Morten Linderud <morten@linderud.pw>
6 years agoMerge pull request #428 from bdeyal/ealready_exit_0
Keith Busch [Tue, 6 Nov 2018 20:02:40 +0000 (13:02 -0700)]
Merge pull request #428 from bdeyal/ealready_exit_0

connect-all: fix exit code on fail to write to /dev/nvme-fabrics

6 years agoconnect-all: special treatment to EALREADY afetr write to /dev/nvme-fabrics
Eyal Ben David [Tue, 6 Nov 2018 18:27:48 +0000 (20:27 +0200)]
connect-all: special treatment to EALREADY afetr write to /dev/nvme-fabrics

6 years agonvme: Handle supported capabilities result for get features
Keith Busch [Tue, 30 Oct 2018 14:33:41 +0000 (08:33 -0600)]
nvme: Handle supported capabilities result for get features

When using the supported capabilities for get feature, SEL set to 3,
no data is transfered and the completion result is the controller
capabilities for the requested feature, not the actual feature. Handle
this accordingly.

Link: https://github.com/linux-nvme/nvme-cli/issues/426
Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: fix endianness for the structure field
Chaitanya Kulkarni [Fri, 26 Oct 2018 17:08:33 +0000 (10:08 -0700)]
nvme-cli: fix endianness for the structure field

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: fix array len to hold string of size 4
Chaitanya Kulkarni [Fri, 26 Oct 2018 17:08:32 +0000 (10:08 -0700)]
nvme-cli: fix array len to hold string of size 4

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: fix a typo
Rami Rosen [Tue, 23 Oct 2018 15:13:23 +0000 (18:13 +0300)]
nvme-cli: fix a typo

Signed-off-by: Rami Rosen <ramirose@gmail.com>
6 years agonvme-cli:fix a typo in SELF-TEST log
lijie [Mon, 29 Oct 2018 13:03:49 +0000 (21:03 +0800)]
nvme-cli:fix a typo in SELF-TEST log

This patch fixes a typo in SELF-TEST log.

6 years agowdc: Use const string for suffix
Keith Busch [Thu, 25 Oct 2018 18:02:49 +0000 (12:02 -0600)]
wdc: Use const string for suffix

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: fix ana-log endianness
Chaitanya Kulkarni [Wed, 24 Oct 2018 18:47:01 +0000 (11:47 -0700)]
nvme-cli: fix ana-log endianness

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: fix sanitize status endianness
Chaitanya Kulkarni [Wed, 24 Oct 2018 18:41:32 +0000 (11:41 -0700)]
nvme-cli: fix sanitize status endianness

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agoMerge pull request #425 from bdeyal/plugins_refactor
Keith Busch [Wed, 24 Oct 2018 17:09:48 +0000 (11:09 -0600)]
Merge pull request #425 from bdeyal/plugins_refactor

Refactor plugins in a file hierarchy

6 years agoRefactor plugins in a file hierarchy
Eyal Ben David [Wed, 24 Oct 2018 15:08:16 +0000 (18:08 +0300)]
Refactor plugins in a file hierarchy

6 years agowdc: Fix strncpy warning
Keith Busch [Wed, 24 Oct 2018 16:21:56 +0000 (10:21 -0600)]
wdc: Fix strncpy warning

Some compilers were complaining copying from the constant source was
truncating it. The size is supposed to protect the destination buffer,
so this patch uses that size instead.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoRe-gen documentation for new files
Keith Busch [Fri, 19 Oct 2018 17:16:43 +0000 (11:16 -0600)]
Re-gen documentation for new files

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli wdc plugin: Add documentation for pfail dump.
Dong Ho [Thu, 18 Oct 2018 21:06:57 +0000 (21:06 +0000)]
nvme-cli wdc plugin: Add documentation for pfail dump.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli wdc plugin: Add get pfail dump command.
Dong Ho [Thu, 18 Oct 2018 21:06:53 +0000 (21:06 +0000)]
nvme-cli wdc plugin: Add get pfail dump command.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoMerge pull request #420 from bsdimp/portable
Keith Busch [Fri, 19 Oct 2018 13:49:41 +0000 (07:49 -0600)]
Merge pull request #420 from bsdimp/portable

Portability fixes

6 years agoMerge pull request #421 from bdeyal/fix_rpm
Keith Busch [Mon, 15 Oct 2018 16:35:11 +0000 (10:35 -0600)]
Merge pull request #421 from bdeyal/fix_rpm

nvme-cli make rpm:  fix bash completion and require in nvme.spec.in

6 years agonvme.spec.in : fix bash completion path, require
Eyal Ben David [Mon, 15 Oct 2018 16:10:46 +0000 (19:10 +0300)]
nvme.spec.in : fix bash completion path, require

6 years agoUpdate documentation
Keith Busch [Fri, 12 Oct 2018 19:03:07 +0000 (13:03 -0600)]
Update documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: Add help text for wdc-plugin command vs-internal-log. Update help text...
Jeffrey Lien [Fri, 12 Oct 2018 15:50:35 +0000 (15:50 +0000)]
nvme-cli: Add help text for wdc-plugin command vs-internal-log. Update help text for wdc-plugin command cap-diag.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agonvme-cli: Add wdc-plugin command vs-internal-log and update wdc-plug cap-diag command...
Jeffrey Lien [Fri, 12 Oct 2018 15:50:05 +0000 (15:50 +0000)]
nvme-cli: Add wdc-plugin command vs-internal-log and update wdc-plug cap-diag command with transfer-size parameter.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agoNVMe-CLI WDC Plugin - Simplify the device id checking routines.
Jeffrey Lien [Tue, 9 Oct 2018 18:10:51 +0000 (18:10 +0000)]
NVMe-CLI WDC Plugin - Simplify the device id checking routines.

This change will make one common function that will retrieve the pci
vendor and device id's and check them for a match of the passed in
id's.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agoMerge pull request #418 from sephalon/oe-packaging
Keith Busch [Tue, 9 Oct 2018 13:46:50 +0000 (07:46 -0600)]
Merge pull request #418 from sephalon/oe-packaging

Makefile: fix bash completion install path

6 years agoMerge pull request #417 from PeterDaveHelloKitchen/update-README.md
Keith Busch [Tue, 9 Oct 2018 13:44:24 +0000 (07:44 -0600)]
Merge pull request #417 from PeterDaveHelloKitchen/update-README.md

Enable code block syntax highlight in README.md

6 years agoMakefile: fix bash completion install path
Stefan Wiehler [Tue, 9 Oct 2018 09:26:34 +0000 (11:26 +0200)]
Makefile: fix bash completion install path

Change path to bash-completion upstream recommendation used by most
distributions.

Signed-off-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>
6 years agoEnable code block syntax highlight in README.md
Peter Dave Hello [Tue, 9 Oct 2018 08:58:49 +0000 (16:58 +0800)]
Enable code block syntax highlight in README.md

6 years agonvme-cli: fix a typo
Rami Rosen [Fri, 5 Oct 2018 16:57:54 +0000 (19:57 +0300)]
nvme-cli: fix a typo

This patch fixes a typo in nvme-cli usage text.

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: fix ioctl argument
Warner Losh [Fri, 5 Oct 2018 04:08:01 +0000 (22:08 -0600)]
nvme-cli: fix ioctl argument

The command argument for ioctl is unsigned long, not int. Fix all the
places that we pass cmd through to the ioctl call to handle it as an
unsigned long. This prevents a sign extension bug when IOCTL commands
encode with the top bit set.

6 years agoUse standard interfaces to get timezone offsets.
M. Warner Losh [Thu, 4 Oct 2018 21:37:17 +0000 (15:37 -0600)]
Use standard interfaces to get timezone offsets.

Use the tm_gmtoff returned from localtime() rather than the global
timezone.  The formal is more portable, while the latter is specific
to glibc.  There's no good reason to use the glibc specific interface.

6 years agoInitialize line.
M. Warner Losh [Thu, 4 Oct 2018 21:11:00 +0000 (15:11 -0600)]
Initialize line.

Ensure line is initialized to NULL. This ensures that the return
expression doesn't use a uninitialized variable when we can't read sys
nodes.

6 years agoWe don't need to include linux/types.h here.
Warner.Losh [Thu, 4 Oct 2018 20:51:13 +0000 (14:51 -0600)]
We don't need to include linux/types.h here.

6 years agonvme-cli: remove endian.h
Warner Losh [Thu, 4 Oct 2018 15:11:48 +0000 (09:11 -0600)]
nvme-cli: remove endian.h

endian.h isn't needed, so remove it.

6 years agoInclude sys/stat.h
Warner Losh [Thu, 4 Oct 2018 05:34:23 +0000 (23:34 -0600)]
Include sys/stat.h

S_* mode bits are defined in sys/stat.h, per POSIX. Include this for
extra portability.

6 years agoInclude libgen.h for basename prototype.
Warner Losh [Thu, 4 Oct 2018 05:29:04 +0000 (23:29 -0600)]
Include libgen.h for basename prototype.

Also, convert open_dev to take a char * and remove the cast from where
it's called. basenmae takes a char * and modifies the string. In this
case, such modifications are fine and only the const char * type was
in error.

6 years agoRemove unnecessary linux/types.h include.
Warner Losh [Thu, 4 Oct 2018 05:23:33 +0000 (23:23 -0600)]
Remove unnecessary linux/types.h include.

6 years agoRemove unnecessary asm/byteorder.h
Warner Losh [Thu, 4 Oct 2018 05:21:48 +0000 (23:21 -0600)]
Remove unnecessary asm/byteorder.h

These includes aren't necessary, so remove them.

6 years agoUse sys/ioctl.h to pull in definitions.
Warner Losh [Thu, 4 Oct 2018 05:18:38 +0000 (23:18 -0600)]
Use sys/ioctl.h to pull in definitions.

_IO* are part of the ioctl intereface, so use the more portable
sys/ioctl.h to get the definitions. Eliminate all uses of linux/fs.h
that were needed only for this.

6 years agonvme-cli: make read error handling uniform
Chaitanya Kulkarni [Thu, 27 Sep 2018 23:13:58 +0000 (16:13 -0700)]
nvme-cli: make read error handling uniform

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: fix indentation for dir_[send/receive]
Chaitanya Kulkarni [Mon, 1 Oct 2018 18:32:54 +0000 (11:32 -0700)]
nvme-cli: fix indentation for dir_[send/receive]

This is a cleanup patch to get rid of the inconsistent indentation
for the dir_send() and dir_receive() functions.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: report subsystem-reset not supported by controller
David Milburn [Wed, 26 Sep 2018 13:25:57 +0000 (08:25 -0500)]
nvme-cli: report subsystem-reset not supported by controller

Add a little more description for "nvme subsystem-reset"
failures, currently driver reports "Inappropriate ioctl
for device".

$ nvme subsystem-reset /dev/nvme0
Subsystem-reset: Inappropriate ioctl for device

With this change report controller doesn't support
NVM Subsystem Reset.

$ nvme subsystem-reset /dev/nvme0
Subsystem-reset: NVM Subsystem Reset not supported.

6 years agonvme-cli: prevent resv action field overflow
Austin J Eberle [Tue, 25 Sep 2018 22:45:58 +0000 (16:45 -0600)]
nvme-cli: prevent resv action field overflow

Signed-off-by: Austin Eberle <ajeberle@us.ibm.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoFix nvme test device selection to use controller value defined in the config.json...
Jeffrey Lien [Tue, 25 Sep 2018 14:45:07 +0000 (14:45 +0000)]
Fix nvme test device selection to use controller value defined in the config.json file. Before this fix, the value was hard coded to nvme0.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agoAdd PCI device id checking for the WDC plugin commands.
Jeffrey Lien [Tue, 25 Sep 2018 14:58:34 +0000 (14:58 +0000)]
Add PCI device id checking for the WDC plugin commands.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agoMerge branch 'master' of https://github.com/linux-nvme/nvme-cli
Keith Busch [Fri, 21 Sep 2018 19:30:59 +0000 (13:30 -0600)]
Merge branch 'master' of https://github.com/linux-nvme/nvme-cli

6 years agoUpdate gitignore for generated test files
Keith Busch [Fri, 21 Sep 2018 19:30:25 +0000 (13:30 -0600)]
Update gitignore for generated test files

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: tests: Add get_id_ctrl function
Dong Ho [Fri, 21 Sep 2018 18:10:39 +0000 (18:10 +0000)]
nvme-cli: tests: Add get_id_ctrl function

Signed-off-by: Dong Ho <dong.ho@wdc.com>
6 years agonvme-cli: tests: fix id_ns test coding style
Dong Ho [Fri, 21 Sep 2018 18:10:13 +0000 (18:10 +0000)]
nvme-cli: tests: fix id_ns test coding style

Simplified and fixed coding style to conform with the style of all other tests.

Signed-off-by: Dong Ho <dong.ho@wdc.com>
6 years agonvme-cli: tests: fix id_ctrl test coding style
Dong Ho [Fri, 21 Sep 2018 18:09:35 +0000 (18:09 +0000)]
nvme-cli: tests: fix id_ctrl test coding style

Simplified and fixed coding style to conform with the style of all other tests.

Signed-off-by: Dong Ho <dong.ho@wdc.com>
6 years agonvme-cli: tests: fix fw_log test coding style
Dong Ho [Fri, 21 Sep 2018 18:06:51 +0000 (18:06 +0000)]
nvme-cli: tests: fix fw_log test coding style

Simplified and fixed coding style to conform with the style of all other tests.

Signed-off-by: Dong Ho <dong.ho@wdc.com>
6 years agoMerge pull request #413 from bdeyal/fix_attach_ns_segfault
Keith Busch [Thu, 20 Sep 2018 15:32:14 +0000 (09:32 -0600)]
Merge pull request #413 from bdeyal/fix_attach_ns_segfault

attach-ns : fix segfault for ctrl list wrong input

6 years agonvme-cli: print "\n" after nvme list-subsys -o json
Yi Zhang [Thu, 20 Sep 2018 11:41:57 +0000 (19:41 +0800)]
nvme-cli: print "\n" after nvme list-subsys -o json

Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
6 years agonvme-cli: kill nvme_passthru_admin()
Hannes Reinecke [Thu, 20 Sep 2018 09:09:39 +0000 (11:09 +0200)]
nvme-cli: kill nvme_passthru_admin()

The seagate plugin is the only one using it, and it's identical
to nvme_get_log13(). So replace the invocation with nvme_get_log13()
and remove the function.

Signed-off-by: Hannes Reinecke <hare@suse.com>