]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme add Storage Tag Check field in NVM Commands
authorGollu Appalanaidu <anaidu.gollu@samsung.com>
Fri, 9 Jul 2021 08:19:58 +0000 (13:49 +0530)
committerDaniel Wagner <dwagner@suse.de>
Mon, 15 Nov 2021 11:06:28 +0000 (12:06 +0100)
Add Storage Tag Check(STC) field in Write, Read, Compare,
Write Zeroes and Verify commands

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: changed NVME_RW_STORAGE_TAG_CHECK to NVME_SC_STORAGE_TAG_CHECK]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
16 files changed:
Documentation/nvme-compare.1
Documentation/nvme-compare.html
Documentation/nvme-compare.txt
Documentation/nvme-read.1
Documentation/nvme-read.html
Documentation/nvme-read.txt
Documentation/nvme-verify.1
Documentation/nvme-verify.html
Documentation/nvme-verify.txt
Documentation/nvme-write-zeroes.1
Documentation/nvme-write-zeroes.html
Documentation/nvme-write-zeroes.txt
Documentation/nvme-write.1
Documentation/nvme-write.html
Documentation/nvme-write.txt
nvme.c

index 0638190d9d82edab5963f398af52ad596a6d4a60..ada1790e77b0ff2ed48f0aa58f4586aa81dd2842 100644 (file)
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nvme-compare
-.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
-.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 10/20/2020
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 07/09/2021
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-COMPARE" "1" "10/20/2020" "NVMe" "NVMe Manual"
+.TH "NVME\-COMPARE" "1" "07/09/2021" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -50,6 +50,7 @@ nvme-compare \- Send an NVMe Compare command, provide results
                         [\-\-show\-command | \-v]
                         [\-\-dry\-run | \-w]
                         [\-\-latency | \-t]
+                        [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
 .fi
 .SH "DESCRIPTION"
 .sp
@@ -202,6 +203,11 @@ be set\&. Otherwise \-\-dry\-run option will be
 .RS 4
 Print out the latency the IOCTL took (in us)\&.
 .RE
+.PP
+\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+.RS 4
+This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&.
+.RE
 .SH "EXAMPLES"
 .sp
 No examples yet\&.
index e3b685744df837f43a5790e45d67f5bfbc1f7bf7..0c13e3261ed27cc7730ec5ee2adc633e99de8f18 100644 (file)
@@ -1,9 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
 <head>\r
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 8.6.8" />\r
+<meta name="generator" content="AsciiDoc 8.6.10" />\r
 <title>nvme-compare(1)</title>\r
 <style type="text/css">\r
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */\r
@@ -94,7 +95,9 @@ ul > li > * { color: black; }
   padding: 0;\r
   margin: 0;\r
 }\r
-\r
+pre {\r
+  white-space: pre-wrap;\r
+}\r
 \r
 #author {\r
   color: #527bbd;\r
@@ -223,7 +226,7 @@ div.exampleblock > div.content {
 }\r
 \r
 div.imageblock div.content { padding-left: 0; }\r
-span.image img { border-style: none; }\r
+span.image img { border-style: none; vertical-align: text-bottom; }\r
 a.image:visited { color: white; }\r
 \r
 dl {\r
@@ -763,7 +766,8 @@ nvme-compare(1) Manual Page
                         [--dsm=&lt;dsm&gt; | -D &lt;dsm&gt;]\r
                         [--show-command | -v]\r
                         [--dry-run | -w]\r
-                        [--latency | -t]</pre>\r
+                        [--latency | -t]\r
+                        [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]</pre>\r
 <div class="attribution">\r
 </div></div>\r
 </div>\r
@@ -1037,6 +1041,18 @@ metadata is passes.</p></td>
         Print out the latency the IOCTL took (in us).\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+--storage-tag-check=&lt;storage-tag-check&gt;\r
+</dt>\r
+<dt class="hdlist1">\r
+-C &lt;storage-tag-check&gt;\r
+</dt>\r
+<dd>\r
+<p>\r
+        This bit specifies the Storage Tag field shall be checked as part of end-to-end\r
+        data protection processing.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 </div>\r
 </div>\r
@@ -1056,7 +1072,8 @@ metadata is passes.</p></td>
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2018-12-17 13:07:47 MST\r
+Last updated\r
+ 2021-07-09 14:16:50 IST\r
 </div>\r
 </div>\r
 </body>\r
index 9185c5fbe0908f0b3150334af0fc8c03a3138a14..b6f88637c3d10a15f9bf06c00b1b3fa123a08408 100644 (file)
@@ -26,6 +26,7 @@ SYNOPSIS
                        [--show-command | -v]
                        [--dry-run | -w]
                        [--latency | -t]
+                       [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
 
 DESCRIPTION
 -----------
@@ -139,6 +140,11 @@ metadata is passes.
 --latency::
        Print out the latency the IOCTL took (in us).
 
+--storage-tag-check=<storage-tag-check>::
+-C <storage-tag-check>::
+       This bit specifies the Storage Tag field shall be checked as part of end-to-end
+       data protection processing.
+
 EXAMPLES
 --------
 No examples yet.
index 7ba8d6af24900af6403eb5bf0b3ee33c640800b5..303fc05aff76b4b98987d63f1b8855454ea864d2 100644 (file)
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nvme-read
-.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
-.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 10/20/2020
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 07/09/2021
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-READ" "1" "10/20/2020" "NVMe" "NVMe Manual"
+.TH "NVME\-READ" "1" "07/09/2021" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -50,6 +50,7 @@ nvme-read \- Send an NVMe Read command, provide results
                         [\-\-show\-command | \-v]
                         [\-\-dry\-run | \-w]
                         [\-\-latency | \-t]
+                        [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
 .fi
 .SH "DESCRIPTION"
 .sp
@@ -178,6 +179,11 @@ be set\&. Otherwise \-\-dry\-run option will be
 .RS 4
 Print out the latency the IOCTL took (in us)\&.
 .RE
+.PP
+\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+.RS 4
+This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&.
+.RE
 .SH "EXAMPLES"
 .sp
 No examples yet\&.
index fdc1606fba0c62d9cd39797a06b7404fdc8f456c..d61580c46cf1de00ccb52695ff6d71b6d4f217da 100644 (file)
@@ -766,7 +766,8 @@ nvme-read(1) Manual Page
                         [--dsm=&lt;dsm&gt; | -D &lt;dsm&gt;]\r
                         [--show-command | -v]\r
                         [--dry-run | -w]\r
-                        [--latency | -t]</pre>\r
+                        [--latency | -t]\r
+                        [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]</pre>\r
 <div class="attribution">\r
 </div></div>\r
 </div>\r
@@ -1013,6 +1014,18 @@ metadata is passes.</p></td>
         Print out the latency the IOCTL took (in us).\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+--storage-tag-check=&lt;storage-tag-check&gt;\r
+</dt>\r
+<dt class="hdlist1">\r
+-C &lt;storage-tag-check&gt;\r
+</dt>\r
+<dd>\r
+<p>\r
+        This bit specifies the Storage Tag field shall be checked as part of end-to-end\r
+        data protection processing.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 </div>\r
 </div>\r
@@ -1033,7 +1046,7 @@ metadata is passes.</p></td>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2019-10-12 00:12:24 JST\r
+ 2021-07-09 14:16:42 IST\r
 </div>\r
 </div>\r
 </body>\r
index 55a701cb0a5bcc8ca3feb4a0fda0aa0809f93569..58902e7116d9510d88fbcc7d04247f8f096015fd 100644 (file)
@@ -26,6 +26,7 @@ SYNOPSIS
                        [--show-command | -v]
                        [--dry-run | -w]
                        [--latency | -t]
+                       [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
 
 DESCRIPTION
 -----------
@@ -128,6 +129,11 @@ metadata is passes.
 --latency::
        Print out the latency the IOCTL took (in us).
 
+--storage-tag-check=<storage-tag-check>::
+-C <storage-tag-check>::
+       This bit specifies the Storage Tag field shall be checked as part of end-to-end
+       data protection processing.
+
 EXAMPLES
 --------
 No examples yet.
index c6ddd89d20a8bc1a0ba6785e1c5c20d30ce9faa8..80ecee996a2536d5752d7776d9f8e656139dec4e 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-verify
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 07/08/2021
+.\"      Date: 07/09/2021
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-VERIFY" "1" "07/08/2021" "NVMe" "NVMe Manual"
+.TH "NVME\-VERIFY" "1" "07/09/2021" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -42,6 +42,7 @@ nvme-verify \- Send an NVMe Verify command, return results
             [\-\-app\-tag\-mask=<appmask> | \-m <appmask>]
             [\-\-app\-tag=<apptag> | \-a <apptag>]
             [\-\-storage\-tag<storage\-tag> | \-S <storage\-tag>]
+            [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
 .fi
 .SH "DESCRIPTION"
 .sp
@@ -137,6 +138,11 @@ Optional application tag when used with protection information\&.
 .RS 4
 Variable Sized Expected Logical Block Storage Tag(ELBST) and Expected Logical Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits\&.
 .RE
+.PP
+\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+.RS 4
+This bit specifies the Storage Tag field shall be checked as part of Verify operation\&.
+.RE
 .SH "EXAMPLES"
 .sp
 No examples yet\&.
index 787541dfd1e30e17a3e940bf80a588204e8d74f8..3567ec4e07d2b3f6aad1e65977e6e5bbdfa8f509 100644 (file)
@@ -758,7 +758,8 @@ nvme-verify(1) Manual Page
             [--ref-tag=&lt;reftag&gt; | -r &lt;reftag&gt;]\r
             [--app-tag-mask=&lt;appmask&gt; | -m &lt;appmask&gt;]\r
             [--app-tag=&lt;apptag&gt; | -a &lt;apptag&gt;]\r
-            [--storage-tag&lt;storage-tag&gt; | -S &lt;storage-tag&gt;]</pre>\r
+            [--storage-tag&lt;storage-tag&gt; | -S &lt;storage-tag&gt;]\r
+            [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]</pre>\r
 <div class="attribution">\r
 </div></div>\r
 </div>\r
@@ -922,6 +923,17 @@ metadata is passes.</p></td>
         Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits.\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+--storage-tag-check=&lt;storage-tag-check&gt;\r
+</dt>\r
+<dt class="hdlist1">\r
+-C &lt;storage-tag-check&gt;\r
+</dt>\r
+<dd>\r
+<p>\r
+        This bit specifies the Storage Tag field shall be checked as part of Verify operation.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 </div>\r
 </div>\r
@@ -942,7 +954,7 @@ metadata is passes.</p></td>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2021-07-07 23:04:31 IST\r
+ 2021-07-09 13:43:04 IST\r
 </div>\r
 </div>\r
 </body>\r
index 8fa1ce075898edb04839c453ea13ef474f277000..3dc2fc7f0bf22446fdc5ce56c689f31013685106 100644 (file)
@@ -18,6 +18,7 @@ SYNOPSIS
             [--app-tag-mask=<appmask> | -m <appmask>]
             [--app-tag=<apptag> | -a <apptag>]
             [--storage-tag<storage-tag> | -S <storage-tag>]
+            [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
 
 DESCRIPTION
 -----------
@@ -79,6 +80,10 @@ metadata is passes.
        Variable Sized Expected Logical Block Storage Tag(ELBST) and Expected Logical
        Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits.
 
+--storage-tag-check=<storage-tag-check>::
+-C <storage-tag-check>::
+       This bit specifies the Storage Tag field shall be checked as part of Verify operation.
+
 EXAMPLES
 --------
 No examples yet.
index de99f12fdc6aec554921d4ea7c2c59b42fdbf436..d7f06bb26ef4bbcfee8d53417f18b44183c55231 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-zeroes
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 07/08/2021
+.\"      Date: 07/09/2021
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-ZEROES" "1" "07/08/2021" "NVMe" "NVMe Manual"
+.TH "NVME\-ZEROES" "1" "07/09/2021" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -43,6 +43,7 @@ nvme-write-zeroes \- Send an NVMe write zeroes command, return results
                         [\-\-force\-unit\-access | \-f]
                         [\-\-namespace\-id=<nsid> | \-n <nsid>]
                         [\-\-storage\-tag<storage\-tag> | \-S <storage\-tag>]
+                        [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
 .fi
 .SH "DESCRIPTION"
 .sp
@@ -143,6 +144,11 @@ Namespace ID use in the command\&.
 .RS 4
 Variable Sized Expected Logical Block Storage Tag(ELBST) and Expected Logical Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits\&.
 .RE
+.PP
+\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+.RS 4
+This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&.
+.RE
 .SH "EXAMPLES"
 .sp
 No examples yet\&.
index 064150ca6b0269ca47da95c8faff545f18dc48a2..0912800495af91f54376605755d87ad3e2ba14ed 100644 (file)
@@ -759,7 +759,8 @@ nvme-zeroes(1) Manual Page
                         [--limited-retry | -l]\r
                         [--force-unit-access | -f]\r
                         [--namespace-id=&lt;nsid&gt; | -n &lt;nsid&gt;]\r
-                        [--storage-tag&lt;storage-tag&gt; | -S &lt;storage-tag&gt;]</pre>\r
+                        [--storage-tag&lt;storage-tag&gt; | -S &lt;storage-tag&gt;]\r
+                        [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]</pre>\r
 <div class="attribution">\r
 </div></div>\r
 </div>\r
@@ -933,6 +934,18 @@ metadata is passes.</p></td>
         Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits.\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+--storage-tag-check=&lt;storage-tag-check&gt;\r
+</dt>\r
+<dt class="hdlist1">\r
+-C &lt;storage-tag-check&gt;\r
+</dt>\r
+<dd>\r
+<p>\r
+        This bit specifies the Storage Tag field shall be checked as part of end-to-end\r
+        data protection processing.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 </div>\r
 </div>\r
@@ -953,7 +966,7 @@ metadata is passes.</p></td>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2021-07-07 01:54:21 IST\r
+ 2021-07-09 13:42:09 IST\r
 </div>\r
 </div>\r
 </body>\r
index 2ef4da755ec9ff6dec79f205a4337ba436c365a3..34fec9de8b5b8a1635c7ddf787c409da35d845f9 100644 (file)
@@ -19,6 +19,7 @@ SYNOPSIS
                        [--force-unit-access | -f]
                        [--namespace-id=<nsid> | -n <nsid>]
                        [--storage-tag<storage-tag> | -S <storage-tag>]
+                       [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
 
 DESCRIPTION
 -----------
@@ -83,6 +84,11 @@ metadata is passes.
        Variable Sized Expected Logical Block Storage Tag(ELBST) and Expected Logical
        Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits.
 
+--storage-tag-check=<storage-tag-check>::
+-C <storage-tag-check>::
+       This bit specifies the Storage Tag field shall be checked as part of end-to-end
+       data protection processing.
+
 EXAMPLES
 --------
 No examples yet.
index 727ac0351631c2abee39ca7614e6b1ce035a53e4..b8e49e5543a7453f0ad43ffe0bfd338b25640cfe 100644 (file)
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nvme-write
-.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
-.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 10/20/2020
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 07/09/2021
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-WRITE" "1" "10/20/2020" "NVMe" "NVMe Manual"
+.TH "NVME\-WRITE" "1" "07/09/2021" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -50,6 +50,7 @@ nvme-write \- Send an NVMe write command, provide results
                         [\-\-show\-command | \-v]
                         [\-\-dry\-run | \-w]
                         [\-\-latency | \-t]
+                        [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
 .fi
 .SH "DESCRIPTION"
 .sp
@@ -188,6 +189,11 @@ be set\&. Otherwise \-\-dry\-run option will be
 .RS 4
 Print out the latency the IOCTL took (in us)\&.
 .RE
+.PP
+\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+.RS 4
+This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&.
+.RE
 .SH "EXAMPLES"
 .sp
 No examples yet\&.
index b59de9d5f413f8e5ff5cffca30f316f480edbb7d..57dccc3ec21e0132e2d65f2974c744f19cc05eb2 100644 (file)
@@ -766,7 +766,8 @@ nvme-write(1) Manual Page
                         [--dsm=&lt;dsm&gt; | -D &lt;dsm&gt;]\r
                         [--show-command | -v]\r
                         [--dry-run | -w]\r
-                        [--latency | -t]</pre>\r
+                        [--latency | -t]\r
+                        [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]</pre>\r
 <div class="attribution">\r
 </div></div>\r
 </div>\r
@@ -1035,6 +1036,18 @@ metadata is passes.</p></td>
         Print out the latency the IOCTL took (in us).\r
 </p>\r
 </dd>\r
+<dt class="hdlist1">\r
+--storage-tag-check=&lt;storage-tag-check&gt;\r
+</dt>\r
+<dt class="hdlist1">\r
+-C &lt;storage-tag-check&gt;\r
+</dt>\r
+<dd>\r
+<p>\r
+        This bit specifies the Storage Tag field shall be checked as part of end-to-end\r
+        data protection processing.\r
+</p>\r
+</dd>\r
 </dl></div>\r
 </div>\r
 </div>\r
@@ -1055,7 +1068,7 @@ metadata is passes.</p></td>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2018-11-29 13:31:13 GMT\r
+ 2021-07-09 14:16:34 IST\r
 </div>\r
 </div>\r
 </body>\r
index 2074f52130e36292e52486c94766e7666f2d0003..c48e6ae1d91ef8520b647025a062eff2458a3048 100644 (file)
@@ -26,6 +26,7 @@ SYNOPSIS
                        [--show-command | -v]
                        [--dry-run | -w]
                        [--latency | -t]
+                       [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
 
 DESCRIPTION
 -----------
@@ -136,6 +137,11 @@ metadata is passes.
 --latency::
        Print out the latency the IOCTL took (in us).
 
+--storage-tag-check=<storage-tag-check>::
+-C <storage-tag-check>::
+       This bit specifies the Storage Tag field shall be checked as part of end-to-end
+       data protection processing.
+
 EXAMPLES
 --------
 No examples yet.
diff --git a/nvme.c b/nvme.c
index 5101cf28cb4250fa32ecbfc138b3ab698f8c42a4..33eb5687a564269649567d968ec520b2c03d7f1a 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -4293,6 +4293,8 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi
        const char *storage_tag = "storage tag, CDW2 and CDW3 (00:47) bits "\
                "(for end to end PI)";
        const char *deac = "Set DEAC bit, requesting controller to deallocate specified logical blocks";
+       const char *storage_tag_check = "This bit specifies the Storage Tag field shall be checked as "\
+               "part of end-to-end data protection processing";
 
        struct config {
                __u64 start_block;
@@ -4306,16 +4308,18 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi
                int   deac;
                int   limited_retry;
                int   force_unit_access;
+               int   storage_tag_check;
        };
 
        struct config cfg = {
-               .start_block     = 0,
-               .block_count     = 0,
-               .prinfo          = 0,
-               .ref_tag         = 0,
-               .app_tag_mask    = 0,
-               .app_tag         = 0,
-               .storage_tag     = 0,
+               .start_block            = 0,
+               .block_count            = 0,
+               .prinfo                 = 0,
+               .ref_tag                = 0,
+               .app_tag_mask           = 0,
+               .app_tag                = 0,
+               .storage_tag            = 0,
+               .storage_tag_check      = 0,
        };
 
        OPT_ARGS(opts) = {
@@ -4330,6 +4334,7 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi
                OPT_SHRT("app-tag-mask",      'm', &cfg.app_tag_mask,      app_tag_mask),
                OPT_SHRT("app-tag",           'a', &cfg.app_tag,           app_tag),
                OPT_SUFFIX("storage-tag",     'S', &cfg.storage_tag,       storage_tag),
+               OPT_FLAG("storage-tag-check", 'C', &cfg.storage_tag_check, storage_tag_check),
                OPT_END()
        };
 
@@ -4349,6 +4354,8 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi
                control |= NVME_IO_FUA;
        if (cfg.deac)
                control |= NVME_IO_DEAC;
+       if (cfg.storage_tag_check)
+               control |= NVME_SC_STORAGE_TAG_CHECK;
        if (!cfg.namespace_id) {
                err = nvme_get_nsid(fd, &cfg.namespace_id);
                if (err < 0) {
@@ -5001,6 +5008,8 @@ static int submit_io(int opcode, char *command, const char *desc,
        const char *dtype = "directive type (for write-only)";
        const char *dspec = "directive specific (for write-only)";
        const char *dsm = "dataset management attributes (lower 16 bits)";
+       const char *storage_tag_check = "This bit specifies the Storage Tag field shall be " \
+               "checked as part of end-to-end data protection processing";
 
        struct config {
                __u32 namespace_id;
@@ -5019,22 +5028,24 @@ static int submit_io(int opcode, char *command, const char *desc,
                __u16 app_tag;
                int   limited_retry;
                int   force_unit_access;
+               int   storage_tag_check;
                int   show;
                int   dry_run;
                int   latency;
        };
 
        struct config cfg = {
-               .start_block     = 0,
-               .block_count     = 0,
-               .data_size       = 0,
-               .metadata_size   = 0,
-               .ref_tag         = 0,
-               .data            = "",
-               .metadata        = "",
-               .prinfo          = 0,
-               .app_tag_mask    = 0,
-               .app_tag         = 0,
+               .start_block            = 0,
+               .block_count            = 0,
+               .data_size              = 0,
+               .metadata_size          = 0,
+               .ref_tag                = 0,
+               .data                   = "",
+               .metadata               = "",
+               .prinfo                 = 0,
+               .app_tag_mask           = 0,
+               .app_tag                = 0,
+               .storage_tag_check      = 0,
        };
 
        OPT_ARGS(opts) = {
@@ -5051,6 +5062,7 @@ static int submit_io(int opcode, char *command, const char *desc,
                OPT_SHRT("app-tag",           'a', &cfg.app_tag,           app_tag),
                OPT_FLAG("limited-retry",     'l', &cfg.limited_retry,     limited_retry),
                OPT_FLAG("force-unit-access", 'f', &cfg.force_unit_access, force),
+               OPT_FLAG("storage-tag-check", 'C', &cfg.storage_tag_check, storage_tag_check),
                OPT_BYTE("dir-type",          'T', &cfg.dtype,             dtype),
                OPT_SHRT("dir-spec",          'S', &cfg.dspec,             dspec),
                OPT_SHRT("dsm",               'D', &cfg.dsmgmt,            dsm),
@@ -5085,6 +5097,8 @@ static int submit_io(int opcode, char *command, const char *desc,
                control |= NVME_IO_LR;
        if (cfg.force_unit_access)
                control |= NVME_IO_FUA;
+       if (cfg.storage_tag_check)
+               control |= NVME_SC_STORAGE_TAG_CHECK;
        if (cfg.dtype) {
                if (cfg.dtype > 0xf) {
                        fprintf(stderr, "Invalid directive type, %x\n",
@@ -5293,6 +5307,8 @@ static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin
        const char *app_tag = "app tag (for end to end PI)";
        const char *storage_tag = "storage tag, CDW2 and CDW3 (00:47) bits "\
                "(for end to end PI)";
+       const char *storage_tag_check = "This bit specifies the Storage Tag field shall "\
+               "be checked as part of Verify operation";
 
        struct config {
                __u64 start_block;
@@ -5303,6 +5319,7 @@ static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin
                __u16 block_count;
                __u8  prinfo;
                __u64 storage_tag;
+               int   storage_tag_check;
                int   limited_retry;
                int   force_unit_access;
        };
@@ -5318,6 +5335,7 @@ static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin
                .limited_retry     = 0,
                .force_unit_access = 0,
                .storage_tag       = 0,
+               .storage_tag_check = 0,
        };
 
        OPT_ARGS(opts) = {
@@ -5331,6 +5349,7 @@ static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin
                OPT_SHRT("app-tag",           'a', &cfg.app_tag,           app_tag),
                OPT_SHRT("app-tag-mask",      'm', &cfg.app_tag_mask,      app_tag_mask),
                OPT_SUFFIX("storage-tag",     'S', &cfg.storage_tag,       storage_tag),
+               OPT_FLAG("storage-tag-check", 'C', &cfg.storage_tag_check, storage_tag_check),
                OPT_END()
        };
 
@@ -5348,6 +5367,8 @@ static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin
                control |= NVME_IO_LR;
        if (cfg.force_unit_access)
                control |= NVME_IO_FUA;
+       if (cfg.storage_tag_check)
+               control |= NVME_SC_STORAGE_TAG_CHECK;
 
        if (!cfg.namespace_id) {
                err = nvme_get_nsid(fd, &cfg.namespace_id);