]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
Update help on IO command parameters
authorKeith Busch <keith.busch@intel.com>
Mon, 20 Jun 2016 23:03:43 +0000 (17:03 -0600)
committerKeith Busch <keith.busch@intel.com>
Mon, 20 Jun 2016 23:03:43 +0000 (17:03 -0600)
The block count has always been 0's based, but you'd never know that
without reading the code.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Documentation/nvme-read.1
Documentation/nvme-read.html
Documentation/nvme-read.txt
Documentation/nvme-write.1
Documentation/nvme-write.html
Documentation/nvme-write.txt
nvme.c

index d1b6f497dd4e7d8697d4315e9b5cd418c22642e5..73bc5e8b191f1ab87ad3e575a8f4d67a530bfda2 100644 (file)
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nvme-read
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 05/16/2016
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\"      Date: 06/20/2016
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-READ" "1" "05/16/2016" "NVMe" "NVMe Manual"
+.TH "NVME\-READ" "1" "06/20/2016" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -56,6 +56,11 @@ The Read command reads the logical blocks specified by the command from the medi
 Start block\&.
 .RE
 .PP
+\-\-block\-count, \-c
+.RS 4
+The number of blocks to transfer\&. This is a zeroes based value to align with the kernel\(cqs use of this field\&. (ie\&. 0 means transfer 1 block)\&.
+.RE
+.PP
 \-\-latency, \-t
 .RS 4
 Print out the latency the IOCTL took (in us)\&.
index 72ad8deca79c253b901c5db1d844fe9a37329113..7b6f5cdf0ff038052d48da60aa2c86c17af1efb4 100644 (file)
@@ -435,7 +435,7 @@ thead, p.table.header {
 p.table {\r
   margin-top: 0;\r
 }\r
-/* Because the table frame attribute is overridden by CSS in most browsers. */\r
+/* Because the table frame attribute is overriden by CSS in most browsers. */\r
 div.tableblock > table[frame="void"] {\r
   border-style: none;\r
 }\r
@@ -793,6 +793,19 @@ by default if you don&#8217;t provide a file.</p></div>
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
+--block-count\r
+</dt>\r
+<dt class="hdlist1">\r
+-c\r
+</dt>\r
+<dd>\r
+<p>\r
+        The number of blocks to transfer. This is a zeroes based value to\r
+        align with the kernel&#8217;s use of this field. (ie. 0 means transfer\r
+        1 block).\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
 --latency\r
 </dt>\r
 <dt class="hdlist1">\r
@@ -822,7 +835,7 @@ by default if you don&#8217;t provide a file.</p></div>
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2015-10-14 13:01:29 MDT\r
+Last updated 2016-06-20 17:02:08 MDT\r
 </div>\r
 </div>\r
 </body>\r
index cd2f75ee95c0c1189c36cd82d6899ba00b356266..6b3da9da0278b5a889883df66a8e842e94e67f36 100644 (file)
@@ -34,6 +34,12 @@ OPTIONS
 -s <slba>::
        Start block.
 
+--block-count::
+-c::
+       The number of blocks to transfer. This is a zeroes based value to
+       align with the kernel's use of this field. (ie. 0 means transfer
+       1 block).
+
 --latency::
 -t::
        Print out the latency the IOCTL took (in us).
index 6b15530fa812ac47ccfa2bdac0f0cd1f51ed1531..5bfefd79f6f8ebee449cae7008891faafff90433 100644 (file)
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nvme-write
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 05/14/2016
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\"      Date: 06/20/2016
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-WRITE" "1" "05/14/2016" "NVMe" "NVMe Manual"
+.TH "NVME\-WRITE" "1" "06/20/2016" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -56,6 +56,11 @@ The Write command writes the logical blocks specified by the command to the medi
 Start block\&.
 .RE
 .PP
+\-\-block\-count, \-c
+.RS 4
+The number of blocks to transfer\&. This is a zeroes based value to align with the kernel\(cqs use of this field\&. (ie\&. 0 means transfer 1 block)\&.
+.RE
+.PP
 \-\-latency, \-t
 .RS 4
 Print out the latency the IOCTL took (in us)\&.
index 52cb07fb903f79b53ab637a7e0b283443f244101..e33eb5269fd285889286ef255469c8f115153c7f 100644 (file)
@@ -793,6 +793,19 @@ if you don&#8217;t provide a file.</p></div>
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
+--block-count\r
+</dt>\r
+<dt class="hdlist1">\r
+-c\r
+</dt>\r
+<dd>\r
+<p>\r
+        The number of blocks to transfer. This is a zeroes based value to\r
+        align with the kernel&#8217;s use of this field. (ie. 0 means transfer\r
+        1 block).\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
 --latency\r
 </dt>\r
 <dt class="hdlist1">\r
@@ -822,7 +835,7 @@ if you don&#8217;t provide a file.</p></div>
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2016-03-02 08:05:01 MST\r
+Last updated 2016-06-20 17:02:21 MDT\r
 </div>\r
 </div>\r
 </body>\r
index ee3b673573bacbe9c068131824e0597cdacb64cb..2af90998bbf8fab19d47cf934e5c060e08a911ae 100644 (file)
@@ -34,6 +34,12 @@ OPTIONS
 -s <slba>::
        Start block.
 
+--block-count::
+-c::
+       The number of blocks to transfer. This is a zeroes based value to
+       align with the kernel's use of this field. (ie. 0 means transfer
+       1 block).
+
 --latency::
 -t::
        Print out the latency the IOCTL took (in us).
diff --git a/nvme.c b/nvme.c
index cfeac84467d709d720aefa462718c4f359801a6e..b6d967c08577520de8709848eec9226240376de6 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -2097,7 +2097,7 @@ static int submit_io(int opcode, char *command, const char *desc,
        __u16 control = 0;
 
        const char *start_block = "64-bit addr of first block to access";
-       const char *block_count = "number of blocks on device to access";
+       const char *block_count = "number of blocks (zeroes based) on device to access";
        const char *data_size = "size of data in bytes";
        const char *metadata_size = "size of metadata in bytes";
        const char *ref_tag = "reference tag (for end to end PI)";