From e6d0d47853dfeae1cb0d7415788b74e25607c093 Mon Sep 17 00:00:00 2001 From: Francis Pravin Date: Fri, 25 Oct 2024 15:32:20 +0530 Subject: [PATCH] doc: Add sanitize command emvs option Add Enter Media Verification State (EVMS) option of Sanitize command. Signed-off-by: Francis Pravin --- Documentation/nvme-sanitize.txt | 12 +++++++++++- completions/_nvme | 4 +++- completions/bash-nvme-completion.sh | 5 +++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Documentation/nvme-sanitize.txt b/Documentation/nvme-sanitize.txt index 1e4346322b..182213b5f4 100644 --- a/Documentation/nvme-sanitize.txt +++ b/Documentation/nvme-sanitize.txt @@ -12,7 +12,7 @@ SYNOPSIS [--owpass= | -n ] [--ause | -u] [--sanact= | -a ] [--ovrpat= | -p ] - [--force] + [--emvs | -e] [--force] [--output-format= | -o ] [--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 :: @@ -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. diff --git a/completions/_nvme b/completions/_nvme index 048fcee4c1..f34b36b414 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -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 diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index 451a6c0097..a6c6f42e06 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -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 ;;