Keith Busch [Mon, 27 Jun 2016 18:22:40 +0000 (12:22 -0600)]
Release nvme-cli v0.8
Lots of updates in this release!
* Code re-organized to support new extensions. While these are called
"plugins", they currently have to be built into the executable. Support
for dynamically loadable plugins is under consideration.
* LightNVM is added as a built-in plugin.
* Intel vendor specific commands and structure decodings are supported
in a new intel plugin.
* Support for NVMe-over-Fabrics
* New output format "json" for a subset of commands that decode returned
structures.
* Lots of various documentation and minor code fixes.
Seems stable, so tagging a release.
Signed-off-by: Keith Busch <keith.busch@intel.com>
root [Mon, 27 Jun 2016 16:28:33 +0000 (09:28 -0700)]
Changed save variable from bool to int
Added "--save/-s" option to man page and documentation
Modified set-feature documentation (Removed invalid command line options, removed references to get-feature, and corrected examples to use set-feature instead of get-feature
root [Tue, 21 Jun 2016 22:31:29 +0000 (15:31 -0700)]
Enhanced both reset and subsystem-reset to return an error message on older kernels with no ioctl support
Added "zeroes based" to the block count documentation for write-uncorr and write-zeroes
Keith Busch [Thu, 16 Jun 2016 18:32:43 +0000 (12:32 -0600)]
fabrics: compile when libudev not installed
libudev is optional to use this repository. Packages can require it if
desired, but others downloading the repo should still be able to use
most of the functionality this tool provides without it.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Tue, 7 Jun 2016 23:02:51 +0000 (17:02 -0600)]
Move program execution to plugin handler
The command list definition is moved to a header file that generates the
structures and prototypes when compiled. This makes it easy to define
new extensions that are not part of the NVMe standard.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Thu, 2 Jun 2016 22:08:31 +0000 (16:08 -0600)]
Seperate kernel uapi from user structures
This pulls in the latest kernel's exported uapi. Including it here
so that it can be used when the kernel headers are either outdated or
not installed.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Wed, 8 Jun 2016 15:59:41 +0000 (09:59 -0600)]
Use pattern rule for compiling objects
All the object files had the same pattern, though some of the targets
were missing the correct dependency list. This fixes them all with a
pattern rule.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Tue, 7 Jun 2016 22:26:56 +0000 (16:26 -0600)]
Move parsing to top directory
We've diverged significantly from the argconfig program that nvme-cli
inherited, so no point in trying to keep it separate. Move it to the
top-level directory to make build rules easier.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Christoph Hellwig [Tue, 7 Jun 2016 15:19:27 +0000 (17:19 +0200)]
implement the connect-all command
Connects to all controllers pointed to by the discovery service.
Includes following referrals.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Ming Lin <ming.l@samsung.com> Tested-by: Ming Lin <ming.l@samsung.com>
Colin Ian King [Fri, 3 Jun 2016 18:27:52 +0000 (19:27 +0100)]
Fix leak of mbuffer on error exit path
building with clang scan-build picked up a memory leak:
nvme.c:2176:3: warning: Potential leak of memory pointed to by 'mbuffer'
fprintf(stderr, "failed to read data buffer from input file\n");
^~~~~~~
instead of returning, jump to free_and_return which performs the
correct cleanup. Also fix the indentation of the return at the end of
the function.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Colin Ian King [Thu, 2 Jun 2016 18:25:54 +0000 (19:25 +0100)]
Fix null pointer dereference on strlen()
If string is NULL, then the proceeding strlen() on the string
will lead to a NULL pointer dereference error (segmentation fault).
Fix this by swapping the order of the comparisons, first check for
a NULL pointer; if that's not true then do the strlen check.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Matias Bjørling [Tue, 24 May 2016 15:35:34 +0000 (17:35 +0200)]
Add support for updating the bad block table
Introduce lnvm-diag-set-bbtbl. It takes the channel, lun, plane, block
and the value to update and sends it to the device. Afterwards, the
status can be retrieved with lnvm-diag-get-bbtbl.
Matias Bjørling [Mon, 23 May 2016 12:44:00 +0000 (14:44 +0200)]
Add LightNVM adminstration and diagnose support
Add support for identify geometry, get bad block interface and
administration interface for LightNVM. This patch adds the following
commands:
- (lnvm-id-ns) Identify geometry of a LightNVM device.
- (lnvm-diag-bbtbl) Retrieve bad block table from LightNVM device.
- (lnvm-info) Get information about modules loaded, and available
devices.
- (lnvm-init) Initialize LightNVM device with a media manager.
- (lnvm-create) Create targets on top of registered devices.
- (lnvm-remove) Remove a registered target.
- (lnvm-factory) Factory initialize a LightNVM device.
Johannes Thumshirn [Wed, 1 Jun 2016 10:12:59 +0000 (12:12 +0200)]
bash completion: Remove shebang line
Remove shebang line from bash completion file as rpmlint on openSUSE/SLE
complains about a script ment to be sourced not executed containing a shebang
line.
[ 38s] nvme-cli.x86_64: W: sourced-script-with-shebang /etc/bash_completion.d/nvme /usr/bin/env
[ 38s] This text file contains a shebang, but is meant to be sourced, not executed.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Keith Busch [Mon, 23 May 2016 19:52:45 +0000 (13:52 -0600)]
Release v0.7
Just a few minor updates and documentation fixes. There is also a new
option for passthrough commands that can be used to help detect data
over/under run.
Tagging a stable release so we can consider features that bring in other
transports and third party extensions.
Signed-off-by: Keith Busch <keith.busch@intel.com>
The data_size and metadata_size fields in the config struct are declared as
__u32, but should actually be __u64. The current types cause issues in the
argument parsing functions depending on machine architecture and endianness. In
ppc64, using __u32 causes "data size not provided" errors due to the way writes
are being done by argconfig_parse() at src/argconfig.c. Changing the types to
__u64 should fix this behaviour and is in accordance to the CFG_LONG_SUFFIX
flag.
Signed-off-by: Heitor Ricardo Alves de Siqueira <halves@linux.vnet.ibm.com>
seehearfeel [Sat, 26 Mar 2016 13:14:43 +0000 (21:14 +0800)]
Fix the bug of Model Number and display the info of Serial Number
OK, I see, thanks for your suggestion.
I have modified the related code of Serial Number, Model Number and Firmware Revision,
other fields are not be changed because the length can not be properly figured out by
the print format specifier, (int)sizeof(field) is too big and (int)strlen(field) is random.
In addition, fix a minor spelling mistake "Namepace" to "Namespace".
seehearfeel [Tue, 22 Mar 2016 11:23:15 +0000 (19:23 +0800)]
Fix the bug of Model Number and display the info of Serial Number
According to the NVMe Specification, there is an error when display Model Number.
In addition, currently it does not display the info of Serial Number, so add it.