]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
6 years agoAdd Virtium plugin extension document
Quyen Truong [Wed, 22 May 2019 02:10:36 +0000 (09:10 +0700)]
Add Virtium plugin extension document

6 years agoAdd Virtium plugin extension
Quyen Truong [Tue, 21 May 2019 11:48:37 +0000 (18:48 +0700)]
Add Virtium plugin extension

6 years agonvme-cli: remove unused NVME_AER_NOTICE_*
Akinobu Mita [Thu, 16 May 2019 16:41:29 +0000 (01:41 +0900)]
nvme-cli: remove unused NVME_AER_NOTICE_*

NVME_AER_NOTICE_* are unused and these values conflict with the values
defined in the kernel nvme.h.

Cc: Keith Busch <keith.busch@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
6 years agonvme-cli: add kernel-doc comment for struct telemetry_log_page_hdr
Akinobu Mita [Thu, 16 May 2019 16:40:28 +0000 (01:40 +0900)]
nvme-cli: add kernel-doc comment for struct telemetry_log_page_hdr

This adds the kernel-doc data structure comment for struct
telemetry_log_page_hdr.

This also replaces spaces with tabs to align the structure fields.

Cc: Keith Busch <keith.busch@intel.com>
Cc: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Suggested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
6 years agorespin documentation
Keith Busch [Thu, 16 May 2019 15:47:11 +0000 (09:47 -0600)]
respin documentation

For format man page updates.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoAdd a note to format on device naming conventions
Keith Busch [Thu, 16 May 2019 15:45:34 +0000 (09:45 -0600)]
Add a note to format on device naming conventions

Provide some help in the documentation on common user pitfalls.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoremove non-portable compile-time check
Keith Busch [Thu, 16 May 2019 15:19:42 +0000 (09:19 -0600)]
remove non-portable compile-time check

_Static_assert is a C11 feature, and we're only targeting to be
compatible from C99.

Link: https://github.com/linux-nvme/nvme-cli/issues/502
Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: use uniform if .. else format
Chaitanya Kulkarni [Sun, 12 May 2019 18:58:20 +0000 (11:58 -0700)]
nvme-cli: use uniform if .. else format

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: use uniform if .. else format
Chaitanya Kulkarni [Sun, 12 May 2019 18:58:19 +0000 (11:58 -0700)]
nvme-cli: use uniform if .. else format

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: use uniform if .. else format
Chaitanya Kulkarni [Sun, 12 May 2019 18:58:18 +0000 (11:58 -0700)]
nvme-cli: use uniform if .. else format

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: remove trailing space
Chaitanya Kulkarni [Sun, 12 May 2019 18:58:17 +0000 (11:58 -0700)]
nvme-cli: remove trailing space

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: code cleanup adjust if statement
Chaitanya Kulkarni [Sun, 12 May 2019 18:58:16 +0000 (11:58 -0700)]
nvme-cli: code cleanup adjust if statement

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme-cli: cmbloc code cleanup
Chaitanya Kulkarni [Sun, 12 May 2019 18:58:15 +0000 (11:58 -0700)]
nvme-cli: cmbloc code cleanup

This patch removes the unnecessary else condition which is out of
format anyway.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agoMerge pull request #498 from kheitke/revert-oncs-change
Keith Busch [Fri, 10 May 2019 22:46:42 +0000 (16:46 -0600)]
Merge pull request #498 from kheitke/revert-oncs-change

nvme-print: remove Virtual Management support from ONCS

6 years agonvme-print: remove Virtual Management support from ONCS
Kenneth Heitke [Fri, 10 May 2019 21:55:57 +0000 (15:55 -0600)]
nvme-print: remove Virtual Management support from ONCS

Revert commit 096fd4d which mistakenly reported Virtual Management
support in the ONCS field of the Identify Controller data structure.
Virtual Management support is part of OACS instead of ONCS and was
already correctly being displayed.

Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com>
6 years agoMerge pull request #494 from minwooim/for-1.9/fit-print-property-size
Keith Busch [Thu, 9 May 2019 20:03:24 +0000 (14:03 -0600)]
Merge pull request #494 from minwooim/for-1.9/fit-print-property-size

For 1.9/fit print property size

6 years agonvme-cli: cleanup comments for telemetry log structure
Akinobu Mita [Thu, 9 May 2019 15:43:17 +0000 (00:43 +0900)]
nvme-cli: cleanup comments for telemetry log structure

This removes three comments for struct nvme_telemetry_log_page_hdr.

- The comment on top of the definision doesn't describe more than the
  struct name itself.

- The rsvd1 field has already been verified.

- The structures with trailing zero size array are commonly used in
  nvme-cli, so we don't need special comment for telemetry_dataarea[0].

Cc: Keith Busch <keith.busch@intel.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Kenneth Heitke <kenneth.heitke@intel.com>
Suggested-by: Kenneth Heitke <kenneth.heitke@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
6 years agoMerge pull request #497 from kheitke/master
Keith Busch [Wed, 8 May 2019 17:38:46 +0000 (11:38 -0600)]
Merge pull request #497 from kheitke/master

nvme-print: update self-test log to include 'aborted due to sanitize'

6 years agonvme-print: update self-test log to include 'aborted due to sanitize'
Kenneth Heitke [Wed, 8 May 2019 17:13:29 +0000 (11:13 -0600)]
nvme-print: update self-test log to include 'aborted due to sanitize'

TP 4022 states that when a sanitize operation is started, self-test
operations in progress shall be aborted. The device-self test log page
includes a new result code that indicates if a self-test was aborted due
to a sanitize operation.

Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com>
6 years agoMerge pull request #496 from DimStar77/master
Keith Busch [Wed, 8 May 2019 16:51:11 +0000 (10:51 -0600)]
Merge pull request #496 from DimStar77/master

DOC: Move to DocBook 5 when using asciidoctor

6 years agoDOC: Move to DocBook 5 when using asciidoctor
Dominique Leuenberger [Wed, 8 May 2019 16:48:02 +0000 (18:48 +0200)]
DOC: Move to DocBook 5 when using asciidoctor

DocBook 5 has been released about a decade ago. Newer versions of
asciidoctor (since version 2.x) no longer support the previously
used DocBook 4.x format, so it is about time for us to switch too.

Fixes #495

6 years agonvme-cli: add missing endianness conversions for telemetry log page
Akinobu Mita [Sun, 5 May 2019 17:55:27 +0000 (10:55 -0700)]
nvme-cli: add missing endianness conversions for telemetry log page

Add missing endianness conversions for data area last block fields of
telemetry log page.

Cc: Keith Busch <keith.busch@intel.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
6 years agoproperty: Fit print size for a property
Minwoo Im [Sun, 5 May 2019 11:58:59 +0000 (20:58 +0900)]
property: Fit print size for a property

We may or may not be able to see the following output in nvme-loop env.
  # nvme get-property /dev/nvme0 -o 0x14
  property: 0x14 (Controller Configuration), value: 7f7800460001
The register CC is not in 64bit, but the upper bits are showing some values
even it's reserved in spec.

This patch makes this print size to fit to its own size of register.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
6 years agoproperty: Remove unnecessary wrapper function
Minwoo Im [Sun, 5 May 2019 11:52:40 +0000 (20:52 +0900)]
property: Remove unnecessary wrapper function

nvme_get_property_helper() used to be an actual function who is getting the
value of the given property with offset.  But, Now we don't have any 'advance'
argument to get back to the caller so that we can remove the helper function by
making it nvme_get_property() which is more intuitive.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
6 years agoproperty: Introduce inline function to check 64bit reg
Minwoo Im [Sun, 5 May 2019 11:46:39 +0000 (20:46 +0900)]
property: Introduce inline function to check 64bit reg

This patch removes 'advance' argument used in get_property_helper() to tell
the register of the given offset is whether 64bit or not, instead introduce a
inline function to check it simply.

This kind of check might be needed at the print module to figure out if given
register should be printed out in 32bit format or 64bit format.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
6 years agoAdd Disable IO flag to wdc_dump_dui_data function
Jeffrey Lien [Tue, 30 Apr 2019 18:48:32 +0000 (18:48 +0000)]
Add Disable IO flag to wdc_dump_dui_data function

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agoMerge pull request #488 from minwooim/for-1.9/djust-uniformity-of-code
Keith Busch [Fri, 26 Apr 2019 13:45:07 +0000 (07:45 -0600)]
Merge pull request #488 from minwooim/for-1.9/djust-uniformity-of-code

nvme-print: Few code clean-ups here

6 years agoReorder primary commands
Keith Busch [Thu, 25 Apr 2019 20:16:02 +0000 (14:16 -0600)]
Reorder primary commands

Group the identify commands together.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoMerge pull request #491 from kheitke/secondary-controller-list
Keith Busch [Thu, 25 Apr 2019 20:20:37 +0000 (14:20 -0600)]
Merge pull request #491 from kheitke/secondary-controller-list

nvme-cli: add identify secondary controller list

6 years agonvme-cli: add identify secondary controller list
Kenneth Heitke [Wed, 24 Apr 2019 23:32:20 +0000 (17:32 -0600)]
nvme-cli: add identify secondary controller list

Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com>
6 years agospec, make: Add discovery.conf to the package files list
Sagi Grimberg [Wed, 24 Apr 2019 21:49:42 +0000 (14:49 -0700)]
spec, make: Add discovery.conf to the package files list

Lets add it as part of the package with a little documentation.

Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agospec, Makefile: add /etc/nvme files to package files
Sagi Grimberg [Wed, 24 Apr 2019 21:49:41 +0000 (14:49 -0700)]
spec, Makefile: add /etc/nvme files to package files

This way it can automatically be removed upon uninstallation
and we don't need %preun target. Also, this will also allow
to get these files on manual installation from sources.

Also, don't settle on the "file exists" check, use the '-s'
to check that it is not empty as well.

Lastly, in order to have hostnqn and hostid updated upon pkg
install, we have install-spec target that would omit hostnqn and
hostid files, and let the rpm %post do it (otherwise we
use the normal install target).

Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agosanitize: Print nvme status in case ret > 0
Minwoo Im [Thu, 25 Apr 2019 13:57:44 +0000 (22:57 +0900)]
sanitize: Print nvme status in case ret > 0

If given 'err' is negative, then it's an internal error so that it needs
to be with perror().  If it's positive, then we can print nvme status
out.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agoget-telemtry-log: Print nvme status in case err > 0
Minwoo Im [Thu, 25 Apr 2019 13:53:01 +0000 (22:53 +0900)]
get-telemtry-log: Print nvme status in case err > 0

If given 'err' is negative, then it's an internal error so that it needs
to be with perror().  If it's positive, then we can print nvme status
out.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agoprint: Add const to return type of string
Minwoo Im [Thu, 25 Apr 2019 13:27:26 +0000 (22:27 +0900)]
print: Add const to return type of string

All those strings are supposed to be const.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agoprint: Introduce show_nvme_status to print nvme status
Minwoo Im [Thu, 25 Apr 2019 12:40:14 +0000 (21:40 +0900)]
print: Introduce show_nvme_status to print nvme status

We have so many subcommands so that we need to have a function in
common to print out status of nvme command.

The nvme status will be printed out in case the subcommand itself fails
due to a reason.  In case of command which is in the middle of the
subcommand, it will be printed as "<cmd> failed" before status.

This patch has nothing to do with functional change.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agoMerge pull request #485 from kheitke/master
Keith Busch [Wed, 24 Apr 2019 21:29:11 +0000 (15:29 -0600)]
Merge pull request #485 from kheitke/master

nvme: fix minor type in id-ctrl human readable output

6 years agonvme: fix minor type in id-ctrl human readable output
Kenneth Heitke [Wed, 24 Apr 2019 21:22:21 +0000 (15:22 -0600)]
nvme: fix minor type in id-ctrl human readable output

Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com>
6 years agoMerge pull request #483 from minwooim/for-1.9/fix-double-free-in-a-loop
Keith Busch [Wed, 24 Apr 2019 13:47:53 +0000 (07:47 -0600)]
Merge pull request #483 from minwooim/for-1.9/fix-double-free-in-a-loop

For 1.9/fix double free in a loop

6 years agoioctl: Fix wrong return case of get_property
Minwoo Im [Wed, 24 Apr 2019 00:48:58 +0000 (01:48 +0100)]
ioctl: Fix wrong return case of get_property

If get_property_helper() succeeds in the first time, and then fails in
the next time, then the ret value will not be updated to an error value.
This patch removes 'ret' variable to make 'err' to return being updated
everytime get_property_helper() invoked.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
6 years agoioctl: Fix double-free in a loop of get_property
Minwoo Im [Wed, 24 Apr 2019 00:46:29 +0000 (01:46 +0100)]
ioctl: Fix double-free in a loop of get_property

As it was reported, *pbar could be double-freed in case
get_property_helper() fails in the middle of the loop.

This issue was reported by Ken Heitke on:
  https://github.com/linux-nvme/nvme-cli/pull/471

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
6 years agonvme-cli: Increase size of ONTAP namespace path variable
Simon Schricker [Tue, 16 Apr 2019 13:27:40 +0000 (06:27 -0700)]
nvme-cli: Increase size of ONTAP namespace path variable

nspath's size is ONTAP_NS_PATHLEN and is written to by:

snprintf(nspath, ONTAP_NS_PATHLEN, "%s%s%s%s", ontap_vol,
                        vol_name, "/", ns_name);

Required bytes:

- ontap_vol is a constant char pointer, set to "/vol/", so 5 bytes
- vol_name's size is ONTAP_LABEL_LEN, which is 260, deducting the
  null-byte for termination makes 259 required bytes
- "/" is 1 byte
- ns_name's size is also ONTAP_LABEL_LEN, which is 260, deducting
  the null-byte for termination makes 259 required bytes
- the final null-byte: 1

That makes in total 5 + 259 + 1 + 259 + 1 = 525 required bytes

Signed-off-by: Simon Schricker <sschricker@suse.de>
6 years agoMerge pull request #480 from amluto/master
Keith Busch [Mon, 15 Apr 2019 17:53:44 +0000 (11:53 -0600)]
Merge pull request #480 from amluto/master

Fix passing CFLAGS on the make command line.

6 years agoFix passing CFLAGS on the make command line.
Andy Lutomirski [Mon, 15 Apr 2019 17:48:05 +0000 (10:48 -0700)]
Fix passing CFLAGS on the make command line.

Commit 254bcd6b2343 ("Fix CFLAGS parameter") only fixed the problem
if the variable came from the environment, not if it came from the
command line.  Fix it using 'override'.  See the GNU Make manual,
section 6.7 ("Overriding variables") for details.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
6 years agoRegen docs
Keith Busch [Mon, 15 Apr 2019 14:38:14 +0000 (08:38 -0600)]
Regen docs

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: fix typo, removing the duplicate 'are'
Simon Schricker [Thu, 11 Apr 2019 09:23:16 +0000 (11:23 +0200)]
nvme-cli: fix typo, removing the duplicate 'are'

Signed-off-by: Simon Schricker <sschricker@suse.de>
6 years agoRevert "plugin: Return EINVAL instead of ENOTTY"
Keith Busch [Fri, 12 Apr 2019 20:48:29 +0000 (14:48 -0600)]
Revert "plugin: Return EINVAL instead of ENOTTY"

This reverts commit 048cd68c8f32c42b7098e1d21c06966f7fc6f099.

The wrong help information is being printed, so just doing a simple revert to
fix it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoMerge pull request #479 from yaznahar/use_hex_prefix_in_idctrl_output
Keith Busch [Thu, 11 Apr 2019 14:39:39 +0000 (08:39 -0600)]
Merge pull request #479 from yaznahar/use_hex_prefix_in_idctrl_output

Always use 0x prefix for hexdecimal values of id-ctrl output

6 years agoUse 0x prefix for all hex values of id-ctrl output
Alexander Larin [Thu, 11 Apr 2019 14:11:50 +0000 (17:11 +0300)]
Use 0x prefix for all hex values of id-ctrl output

Sometimes human-readable id-ctrl output could be confusing, e.g.
$ nvme id-ctrl /dev/nvme0
NVME Identify Controller:
vid       : 0x144d
ssvid     : 0x144d
sn        : S3HDNX0K601842
mn        : SAMSUNG MZWLL1T6HEHP-00003
fr        : GPNA5B3Q
rab       : 8
ieee      : 002538
cmic      : 0x3
mdts      : 5
cntlid    : 21
...
Here cntlid value is hexdecimal and equals 33, but nothing shows that.
In the same time some other values have 0x prefix. Let's use the prefix
for all hexdecimal values of the output.

Signed-off-by: Alexander Larin <znahar@yandex-team.ru>
6 years agoMerge pull request #478 from minwooim/for-v1.9/return-einval-instead-of-enotty
Keith Busch [Thu, 11 Apr 2019 14:06:36 +0000 (08:06 -0600)]
Merge pull request #478 from minwooim/for-v1.9/return-einval-instead-of-enotty

plugin: Return EINVAL instead of ENOTTY

6 years agoplugin: Return EINVAL instead of ENOTTY
Minwoo Im [Thu, 11 Apr 2019 12:51:19 +0000 (21:51 +0900)]
plugin: Return EINVAL instead of ENOTTY

When a given string for a subcommand is not valid, we can return EINVAL which
means invalid arguments.  ENOTTY is used to indicate that an invalid IOCTL
number was specified.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
6 years agoFix Failure to read 0xCA Log Page on SN200 Device [NVMe-CLI] Fix Incorrect Data Forma...
Jeffrey Lien [Wed, 10 Apr 2019 15:15:21 +0000 (15:15 +0000)]
Fix Failure to read 0xCA Log Page on SN200 Device [NVMe-CLI] Fix Incorrect Data Formats with the 0xCA and 0xD0 Log Pages

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agoMerge pull request #477 from minwooim/for-v1.9/fix_fd_leak
Keith Busch [Wed, 10 Apr 2019 15:24:53 +0000 (09:24 -0600)]
Merge pull request #477 from minwooim/for-v1.9/fix_fd_leak

nvme: Fix file descriptor leak in telemtry-log

6 years agonvme: Close a fd leaked
Minwoo Im [Wed, 13 Mar 2019 05:08:38 +0000 (14:08 +0900)]
nvme: Close a fd leaked

"output" file descriptor has not been closed not only when this command
is successfully done, but error occurs in the middle of the procdure.

This patch put "output" open after memory preparation so that we can add
close_output label before free_mem.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
6 years agoRelease for new stable fixes v1.8.1
Keith Busch [Tue, 9 Apr 2019 21:32:46 +0000 (15:32 -0600)]
Release for new stable fixes

There's been a few fixes since the last tag that are fairly critical for
some scenarios, so we're tagging a new one already. Since these are all
just fixes and no new features, we'll add an additional minor digit to
the revision.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agonvme-cli: Revert stop-on-failure with connect-all
James Smart [Tue, 9 Apr 2019 20:51:54 +0000 (13:51 -0700)]
nvme-cli: Revert stop-on-failure with connect-all

The patch that added special treatment for EALREADY connect failures
also changed the behavior on what happens if a discovery log contains
an entry that is not connectable by the system or host port. If it
encounters a log entry that can't be connected to, it will not attempt
to connect to any log entries beyond it. This can leave lots of devices
unconnected to.

Revert the stop-on-failure introduced by the previous patch.

Specifically, this failed for me on an FC array that had a discovery log
entry for a port that was not visible via zoning for the initiator
port being used.

Fixes: 1a922e0e121d7 ("connect-all: special treatment to EALREADY afetr write to /dev/nvme-fabrics"
Signed-off-by: James Smart <jsmart2021@gmail.com>
CC: Eyal Ben David <eyalbe@il.ibm.com>
CC: Martin George <Martin.George@netapp.com>
6 years agoFix NSID for command effects log
Keith Busch [Tue, 9 Apr 2019 15:21:19 +0000 (09:21 -0600)]
Fix NSID for command effects log

This should be the all NSID value.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoMerge pull request #476 from kheitke/error-log-fix
Keith Busch [Tue, 9 Apr 2019 14:44:42 +0000 (08:44 -0600)]
Merge pull request #476 from kheitke/error-log-fix

Fix output size for error log raw binary dump

6 years agoFix output size for error log raw binary dump
Kenneth Heitke [Mon, 8 Apr 2019 23:04:54 +0000 (17:04 -0600)]
Fix output size for error log raw binary dump

Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com>
6 years agoRelease version 1.8 v1.8
Keith Busch [Mon, 8 Apr 2019 20:51:59 +0000 (14:51 -0600)]
Release version 1.8

There are some important fixes pending a release tag, so now seems as
good as any to tag the release.

Thank you again to everyone who's contribute to this round. Shortlog
below.

Breno Leitao (2):
      Fix compilation with GCC-8
      Fix CFLAGS parameter

Chaitanya Kulkarni (3):
      nvme-cli: fix compilation with uint64_t cast
      nvme-cli: minor cleanup for submit_io()
      nvme-cli: align all the macros

Dong Ho (11):
      wdc: Change device capability checking
      wdc: Add additional device for vs-internal-log
      wdc: Add device unit info log extraction
      wdc: Add get drive status command
      wdc: Add clear assert dump status command
      wdc: Add drive resize command
      wdc: Update device capabilities for clear pcie corr
      wdc: Update file parameter checking
      wdc: Add command to extract NAND statistics
      wdc: Add data area extraction for DUI command
      wdc: Additional device capabilities check

James Smart (1):
      nvme-cli: fix fc trtype string

Jeffrey Lien (3):
      NVMe-CLI WDC Plugin - add support for additional SN840 device ID.
      WDC plugin Change vs-internal-log Command to Save Partial E6 Log Data.
      WDC Plugins vs-internal-log command unsupported on SN340.

Keith Busch (8):
      generate new documentation
      Regen docs
      Fix print format specifiers
      Regen documentation
      Add new docs to repository
      Generate new documentation
      Fix format block size usage
      Regen documentation

Kenneth Heitke (4):
      Add reporting of Virtual Management support to id-ctrl
      Fix possible NULL pointer dereferences
      Fix possible memory leak on get-internal-log
      Print timestamp as a date and time string

Martin George (2):
      nvme-cli: add netapp ontapdevices command
      nvme-cli: add netapp ontapdevices man page

Mateusz Piotrowski (3):
      Fix markdown indentation issues
      Sort operating systems alphabetically
      Add FreeBSD installation instructions

Maxim (1):
      Adding a helper to format command to enable the user to specify desired block size and have nvme-cli determine the correct LBAF and add format helper to nvme-create-ns command

Minwoo Im (15):
      fabrics: Return negative errno when asprintf() fails
      fabrics: Return negative errno to check remove_ctrl() is failed
      doc: Update nvme-discover by describing options
      doc: Update nvme-connect by describing options
      doc: Update nvme-connect-all by describing options
      doc: Update nvme-disconnect by describing options
      doc: Add missing commands to main document entry
      nvme: Support raw_binary and json format for show-regs
      doc: Update show-regs document with output-format
      ioctl: Free memory if get_property for fabrics failed
      nvme: Use ARRAY_SIZE() macro in common.h
      nvme: Unify min(), max() macro as a common one
      nvme: Simplify description for virt-mgmt
      nvme: Simplify virt-mgmt options to lowercase
      tests: Update print to print() for python3

Roy Shterman (1):
      nvme-print: Fix evaluation of ctratt on pretty print

Sagi Grimberg (1):
      nvme: print I/O error to stderr

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoRegen documentation
Keith Busch [Mon, 8 Apr 2019 20:49:43 +0000 (14:49 -0600)]
Regen documentation

6 years agoMerge pull request #475 from minwooim/for-1.8/update_test_python_version_to_3
Keith Busch [Mon, 8 Apr 2019 15:57:13 +0000 (09:57 -0600)]
Merge pull request #475 from minwooim/for-1.8/update_test_python_version_to_3

tests: Update print to print() for python3

6 years agoMerge pull request #471 from minwooim/for-1.8/fix-mem-leak-from-show-regs
Keith Busch [Mon, 8 Apr 2019 15:56:17 +0000 (09:56 -0600)]
Merge pull request #471 from minwooim/for-1.8/fix-mem-leak-from-show-regs

ioctl: Free memory if get_property for fabrics failed

6 years agoMerge pull request #474 from minwooim/for-1.8/virt-mgmt-clean-up
Keith Busch [Mon, 8 Apr 2019 15:55:42 +0000 (09:55 -0600)]
Merge pull request #474 from minwooim/for-1.8/virt-mgmt-clean-up

[RFC] Simplify virt-mgmt subcommand options to lowercase

6 years agoMerge pull request #470 from minwooim/for-1.8/support_output_format_for_show_regs
Keith Busch [Mon, 8 Apr 2019 15:51:01 +0000 (09:51 -0600)]
Merge pull request #470 from minwooim/for-1.8/support_output_format_for_show_regs

nvme: Support raw_binary and json format for show-regs

6 years agoMerge pull request #472 from minwooim/for-1.8/remove_duplicated_array_len
Keith Busch [Mon, 8 Apr 2019 15:50:16 +0000 (09:50 -0600)]
Merge pull request #472 from minwooim/for-1.8/remove_duplicated_array_len

nvme: Clean-up duplicated macros

6 years agonvme-cli: add netapp ontapdevices man page
Martin George [Mon, 1 Apr 2019 16:39:57 +0000 (09:39 -0700)]
nvme-cli: add netapp ontapdevices man page

Signed-off-by: Martin George <marting@netapp.com>
Reviewed-by: Steve Schremmer <sschremm@netapp.com>
6 years agonvme-cli: add netapp ontapdevices command
Martin George [Mon, 1 Apr 2019 16:39:56 +0000 (09:39 -0700)]
nvme-cli: add netapp ontapdevices command

Add a new ontapdevices command to the NetApp plugin for
NetApp ONTAP devices.

Signed-off-by: Martin George <marting@netapp.com>
Reviewed-by: Steve Schremmer <sschremm@netapp.com>
6 years agotests: Update print to print() for python3
Minwoo Im [Sun, 7 Apr 2019 11:24:55 +0000 (20:24 +0900)]
tests: Update print to print() for python3

The following issue has been reported that README in "tests" seems not
correct because it will not be able to be invoked in case python3
because print() has to be taken instead of print which had been used for
python2.

Issue !429:
  https://github.com/linux-nvme/nvme-cli/issues/429

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agonvme: Simplify virt-mgmt options to lowercase
Minwoo Im [Sun, 7 Apr 2019 10:32:53 +0000 (19:32 +0900)]
nvme: Simplify virt-mgmt options to lowercase

All the other subcommand options are supported with lowercase, but
virt-mgmt subcommand has long argument name started with uppercase.
This can be simplified to a lowercase with being the same with the names
on spec document.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agonvme: Simplify description for virt-mgmt
Minwoo Im [Sun, 7 Apr 2019 10:30:25 +0000 (19:30 +0900)]
nvme: Simplify description for virt-mgmt

The options of virt-mgmt subcommand can be simplified for a good
readability.  This patch not only adds necessary whitespace between
sentences, but remove unnecessary empty line and words which might cause
too long line to describe options.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agonvme: Unify min(), max() macro as a common one
Minwoo Im [Sun, 7 Apr 2019 10:00:19 +0000 (19:00 +0900)]
nvme: Unify min(), max() macro as a common one

min, max macros has been implemented on its own module.  This patch
unifies this kind of macros by moving it to common.h.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agonvme: Use ARRAY_SIZE() macro in common.h
Minwoo Im [Sun, 7 Apr 2019 09:51:08 +0000 (18:51 +0900)]
nvme: Use ARRAY_SIZE() macro in common.h

array_len() in nvme.c can be replaced with ARRAY_SIZE() in common.h
which is already used from other modules such as fabrics.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agoioctl: Free memory if get_property for fabrics failed
Minwoo Im [Sat, 6 Apr 2019 21:45:16 +0000 (06:45 +0900)]
ioctl: Free memory if get_property for fabrics failed

The given *pbar is allocated inside this function without freeing it
will be freed from the caller in case of show-regs subcommand for NVMe-oF
controller.

If Get Property is failed because it has PCIe transport, then it needs
to be freed here instead of caller.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agodoc: Update show-regs document with output-format
Minwoo Im [Sat, 6 Apr 2019 21:12:29 +0000 (06:12 +0900)]
doc: Update show-regs document with output-format

Previous commit has introduced --output-format argument for show-regs
subcommand so that document should be updated.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agonvme: Support raw_binary and json format for show-regs
Minwoo Im [Sat, 6 Apr 2019 21:01:17 +0000 (06:01 +0900)]
nvme: Support raw_binary and json format for show-regs

  Somebody might want to compare entire controller registers in a raw
binary format to check controller status or some of configurations.  It
also can be needed to print out JSON format for easily parsing.

This patch introduces JSON and RAW_BINARY print format with a general
--output-format argument.  This will have "normal" value by default, and
also support "json" and "binary".

We don't care about whether the given "fabrics" argument in
json_ctrl_registers() because all the reserved registers and fields are
to be returned as 0x0 as specified in NVMe-oF "Property Definitions"
section.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agoMerge pull request #469 from kheitke/timestamps
Keith Busch [Fri, 5 Apr 2019 18:48:57 +0000 (12:48 -0600)]
Merge pull request #469 from kheitke/timestamps

Print timestamp as a date and time string

6 years agoPrint timestamp as a date and time string
Kenneth Heitke [Fri, 5 Apr 2019 18:18:30 +0000 (12:18 -0600)]
Print timestamp as a date and time string

Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com>
6 years agoMerge pull request #466 from minwooim/for-1.8/return-negative-errno
Keith Busch [Thu, 4 Apr 2019 16:02:22 +0000 (10:02 -0600)]
Merge pull request #466 from minwooim/for-1.8/return-negative-errno

fabrics: Return negative errno to check failure in discovery

6 years agoMerge pull request #467 from minwooim/for-1.8/fabrics-doc-update
Keith Busch [Thu, 4 Apr 2019 15:59:14 +0000 (09:59 -0600)]
Merge pull request #467 from minwooim/for-1.8/fabrics-doc-update

doc: Update fabrics documentations

6 years agoMerge pull request #468 from kheitke/master
Keith Busch [Thu, 4 Apr 2019 15:58:56 +0000 (09:58 -0600)]
Merge pull request #468 from kheitke/master

Fix possible memory leak on get-internal-log

6 years agoFix format block size usage
Keith Busch [Thu, 4 Apr 2019 15:37:57 +0000 (09:37 -0600)]
Fix format block size usage

Block size is valid only if formatting a specific namespace can be
queried.

Signed-off-by: Keith Busch <keith.busch@intel.com>
6 years agoFix possible memory leak on get-internal-log
Kenneth Heitke [Wed, 3 Apr 2019 23:45:43 +0000 (17:45 -0600)]
Fix possible memory leak on get-internal-log

6 years agodoc: Add missing commands to main document entry
Minwoo Im [Wed, 3 Apr 2019 16:30:33 +0000 (01:30 +0900)]
doc: Add missing commands to main document entry

cmds-main.txt has the entire command sets provided by nvme-cli.  This
patch added the following commands which has already had corresponding
documents already.
1. nvme-connect-all
2. nvme-disconnect
2. nvme-disconnect-all

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agodoc: Update nvme-disconnect by describing options
Minwoo Im [Wed, 3 Apr 2019 16:28:36 +0000 (01:28 +0900)]
doc: Update nvme-disconnect by describing options

Few newly added options have not been described.  This patch updates
document of nvme-connect.

It also makes "See Also" part style proper which have been applied
properly as a title.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agodoc: Update nvme-connect-all by describing options
Minwoo Im [Wed, 3 Apr 2019 16:27:17 +0000 (01:27 +0900)]
doc: Update nvme-connect-all by describing options

We have had newly added command options for Connect to all NVMe-oF subsystems.
This patch updates descriptions of command options.

+ This patch also fixes an trivial mis-aligned paragraph issue which can
be in this commit to avoid any confusions in document update which might
show too many diffs.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agodoc: Update nvme-connect by describing options
Minwoo Im [Wed, 3 Apr 2019 16:25:47 +0000 (01:25 +0900)]
doc: Update nvme-connect by describing options

Few newly added options have not been described.  This patch updates
document of nvme-connect.

It also makes "See Also" part style proper which have been applied
properly as a title.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agodoc: Update nvme-discover by describing options
Minwoo Im [Wed, 3 Apr 2019 16:24:07 +0000 (01:24 +0900)]
doc: Update nvme-discover by describing options

We have had newly added command options for Discover controller.  This
patch updates descriptions of command options.

+ This patch also fixes an trivial mis-aligned paragraph issue which can
be in this commit to avoid any confusions in document update which might
show too many diffs.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agofabrics: Return negative errno to check remove_ctrl() is failed
Minwoo Im [Wed, 3 Apr 2019 15:02:05 +0000 (00:02 +0900)]
fabrics: Return negative errno to check remove_ctrl() is failed

remove_ctrl() might fail due to a reason such as memory allocation
failure.  Once it fails, discovery should not proceed, but return the
errorno to the caller immediately.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agofabrics: Return negative errno when asprintf() fails
Minwoo Im [Wed, 3 Apr 2019 14:53:33 +0000 (23:53 +0900)]
fabrics: Return negative errno when asprintf() fails

asprintf() will return -1 when it fails to allocate memory for the
string given with setting errno to ENOMEM.  For the uniformity, we can
return errno with negative value.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
6 years agoMerge pull request #465 from kheitke/master
Keith Busch [Tue, 2 Apr 2019 09:03:21 +0000 (03:03 -0600)]
Merge pull request #465 from kheitke/master

Fix possible NULL pointer dereferences

6 years agoFix possible NULL pointer dereferences
Kenneth Heitke [Mon, 1 Apr 2019 18:15:55 +0000 (12:15 -0600)]
Fix possible NULL pointer dereferences

6 years agoMerge pull request #464 from kheitke/master
Keith Busch [Tue, 19 Mar 2019 17:41:31 +0000 (11:41 -0600)]
Merge pull request #464 from kheitke/master

Add reporting of Virtual Management support to id-ctrl

6 years agoAdd reporting of Virtual Management support to id-ctrl
Kenneth Heitke [Tue, 19 Mar 2019 17:34:38 +0000 (11:34 -0600)]
Add reporting of Virtual Management support to id-ctrl

6 years agoWDC Plugins vs-internal-log command unsupported on SN340.
Jeffrey Lien [Mon, 18 Mar 2019 15:25:27 +0000 (15:25 +0000)]
WDC Plugins vs-internal-log command unsupported on SN340.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agowdc: Additional device capabilities check
Dong Ho [Mon, 11 Mar 2019 20:34:11 +0000 (20:34 +0000)]
wdc: Additional device capabilities check

6 years agoWDC plugin Change vs-internal-log Command to Save Partial E6 Log Data.
Jeffrey Lien [Wed, 6 Mar 2019 17:01:49 +0000 (17:01 +0000)]
WDC plugin Change vs-internal-log Command to Save Partial E6 Log Data.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
6 years agonvme: print I/O error to stderr
Sagi Grimberg [Wed, 6 Mar 2019 09:42:31 +0000 (01:42 -0800)]
nvme: print I/O error to stderr

something like blktests might rely on this to output to
stderr.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agoMerge pull request #460 from 0mp/master
Keith Busch [Tue, 5 Mar 2019 15:23:15 +0000 (08:23 -0700)]
Merge pull request #460 from 0mp/master

Clean up README and FreeBSD installation instructions

6 years agoMerge pull request #459 from roys-lb/roy/fix_ctratt_print
Keith Busch [Tue, 5 Mar 2019 15:22:33 +0000 (08:22 -0700)]
Merge pull request #459 from roys-lb/roy/fix_ctratt_print

nvme-print: Fix evaluation of ctratt on pretty print