Skip to content

Commit

Permalink
doc: Add sanitize command emvs option
Browse files Browse the repository at this point in the history
Add Enter Media Verification State (EVMS) option of Sanitize command.

Signed-off-by: Francis Pravin <[email protected]>
  • Loading branch information
francispravin5 authored and igaw committed Oct 25, 2024
1 parent f260a8d commit e6d0d47
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
12 changes: 11 additions & 1 deletion Documentation/nvme-sanitize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>::
Expand All @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion completions/_nvme
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions completions/bash-nvme-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down

0 comments on commit e6d0d47

Please sign in to comment.