]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
doc: Add sanitize command emvs option
authorFrancis Pravin <francis.p@samsung.com>
Fri, 25 Oct 2024 10:02:20 +0000 (15:32 +0530)
committerDaniel Wagner <wagi@monom.org>
Fri, 25 Oct 2024 11:48:05 +0000 (13:48 +0200)
Add Enter Media Verification State (EVMS) option of Sanitize command.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
Documentation/nvme-sanitize.txt
completions/_nvme
completions/bash-nvme-completion.sh

index 1e4346322bfa3cbd05533a4d811bc02a2ae0a756..182213b5f4aa3873e7c948cf3502401c2827a405 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
                        [--owpass=<overwrite-pass-count> | -n <overwrite-pass-count>]
                        [--ause | -u] [--sanact=<action> | -a <action>]
                        [--ovrpat=<overwrite-pattern> | -p <overwrite-pattern>]
-                       [--force]
+                       [--emvs | -e] [--force]
                        [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
 
 DESCRIPTION
@@ -73,6 +73,7 @@ OPTIONS
 |0x02 \| 'start-block-erase'| Start a Block Erase sanitize operation
 |0x03 \| 'start-overwrite'| Start an Overwrite sanitize operation
 |0x04 \| 'start-crypto-erase'| Start a Crypto Erase sanitize operation
+|0x05 \| 'exit-media-verification'| Exit Media Verification State
 |=================
 
 -p <overwrite-pattern>::
@@ -83,6 +84,15 @@ OPTIONS
        specifies a 32-bit pattern that is used for the Overwrite
        sanitize operation.
 
+-e::
+--emvs::
+       Enter Media Verification State:
+       If set, then the Media Verification state shall be entered if sanitize
+       processing completes successfully. If cleared, then this bit shall have
+       no effect. If SANACT field does not specify starting a sanitize operation
+       (i.e., is set to any value other than 010b, 011b, or 100b), then this bit
+       shall be ignored by the controller.
+
 --force::
        Ignore namespace is currently busy and performed the operation
        even though.
index 048fcee4c10d157f1ff24fac7ee358cd6a911674..f34b36b414b7b5b5c52559259d1a7e890dc2a038 100644 (file)
@@ -1525,10 +1525,12 @@ _nvme () {
                        -n':alias of --owpass'
                        --ause':Allow unrestricted sanitize exit'
                        -u':alias of --ause'
-                       --sanact=':Sanitize action: 1 = Exit failure mode, 2 = Start block erase, 3 = Start overwrite, 4 = Start crypto erase'
+                       --sanact=':Sanitize action: 1 = Exit failure mode, 2 = Start block erase, 3 = Start overwrite, 4 = Start crypto erase, 5 = Exit media verification'
                        -a':alias of --sanact'
                        --ovrpat=':Overwrite pattern'
                        -p':alias of --ovrpat'
+                       --emvs=':Enter media verification state'
+                       -e':alias of --emvs'
                        )
                        _arguments '*:: :->subcmds'
                        _describe -t commands "nvme sanitize options" _sanitize
index 451a6c0097019429826278d55ed86642bcdf4d5d..a6c6f42e06bf25d21a6b6ffdb75c098dd2aad0d8 100644 (file)
@@ -356,10 +356,11 @@ nvme_list_opts () {
                        ;;
                "sanitize")
                opts+=" --no-dealloc -d --oipbp -i --owpass= -n \
-                       --ause -u --sanact= -a --ovrpat= -p"
+                       --ause -u --sanact= -a --ovrpat= -p --emvs= -e"
                case $opt in
                        --sanact|-a)
-                       vals+=" exit-failure start-block-erase start-overwrite start-crypto-erase"
+                       vals+=" exit-failure start-block-erase start-overwrite \
+                               start-crypto-erase exit-media-verification"
                                ;;
                esac
                        ;;