From: Daniel Wagner Date: Wed, 15 Dec 2021 09:32:37 +0000 (+0100) Subject: nvme: Consolidate --force option and udpate documetation X-Git-Tag: v2.0-rc0~15^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=90592d5188fe6404492d9b6cfd12faaa4ae608ed;p=users%2Fsagi%2Fnvme-cli.git nvme: Consolidate --force option and udpate documetation Refactor the error handling for the --force option. Drop support for the -f and use --force consistent in all commands. Also update the documation accordingly. Signed-off-by: Daniel Wagner --- diff --git a/Documentation/nvme-compare.1 b/Documentation/nvme-compare.1 index ada1790e..272ff789 100644 --- a/Documentation/nvme-compare.1 +++ b/Documentation/nvme-compare.1 @@ -1,13 +1,13 @@ '\" t .\" Title: nvme-compare -.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 07/09/2021 +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 12/15/2021 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-COMPARE" "1" "07/09/2021" "NVMe" "NVMe Manual" +.TH "NVME\-COMPARE" "1" "12/15/2021" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,6 +51,7 @@ nvme-compare \- Send an NVMe Compare command, provide results [\-\-dry\-run | \-w] [\-\-latency | \-t] [\-\-storage\-tag\-check | \-C ] + [\-\-force] .fi .SH "DESCRIPTION" .sp @@ -208,6 +209,11 @@ Print out the latency the IOCTL took (in us)\&. .RS 4 This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&. .RE +.PP +\-\-force +.RS 4 +Ignore namespace is currently busy and perfome the operation even though\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-compare.html b/Documentation/nvme-compare.html index 0c13e326..4f1e5d69 100644 --- a/Documentation/nvme-compare.html +++ b/Documentation/nvme-compare.html @@ -4,7 +4,7 @@ - + nvme-compare(1) - - - - -
-
-

SYNOPSIS

-
-
-
nvme sanitize <device> [--no-dealloc | -d]
-              [--oipbp | -i]
-              [--owpass=<overwrite-pass-count> | -n <overwrite-pass-count>]
-              [--ause | -u]
-              [--sanact=<action> | -a <action>]
-              [--ovrpat=<overwrite-pattern> | -p <overwrite-pattern>]
-
-
-
-
-
-

DESCRIPTION

-
-

For the NVMe device given, sends a Sanitize command and -provides the result.

-

The <device> parameter is mandatory NVMe character device (ex: /dev/nvme0).

-

On success it returns 0, error code otherwise.

-
-
-
-

OPTIONS

-
-
-
--d -
-
---no-delloc -
-
-

- No Deallocate After Sanitize: - If set, then the controller shall not deallocate any logical - blocks as a result of successfully completing the sanitize - operation. If cleared, then the controller should deallocate - logical blocks as a result of successfully completing the - sanitize operation. This bit shall be ignored if the Sanitize - Action field is set to 001b (i.e., Exit Failure Mode). -

-
-
--i -
-
---oipbp -
-
-

- Overwrite Invert Pattern Between Passes: - If set, then the Overwrite Pattern shall be inverted between - passes. If cleared, then the overwrite pattern shall not be - inverted between passes. This bit shall be ignored unless the - Sanitize Action field is set to 011b (i.e., Overwrite). -

-
-
--n <overwrite-pass-count> -
-
---owpass=<overwrite-pass-count> -
-
-

- Overwrite Pass Count: - This field specifies the number of overwrite passes (i.e., - how many times the media is to be overwritten) using the data - from the Overwrite Pattern field of this command. A value of 0 - specifies 16 overwrite passes. This field shall be ignored - unless the Sanitize Action field is set to 011b (i.e., Overwrite). -

-
-
--u -
-
---ause -
-
-

- Allow Unrestricted Sanitize Exit: - If set, then the sanitize operation is performed in unrestricted - completion mode. If cleared then the sanitize operation is - performed in restricted completion mode. This bit shall be ignored - if the Sanitize Action field is set to 001b (i.e., Exit Failure Mode). -

-
-
--a <action> -
-
---sanact=<action> -
-
-

- Sanitize Action: - 000b - Reserved - 001b - Exit Failure Mode - 010b - Start a Block Erase sanitize operation - 011b - Start an Overwrite sanitize operation - 100b - Start a Crypto Erase sanitize operation -

-
-
--p <overwrite-pattern> -
-
---ovrpat=<overwrite-pattern> -
-
-

- Overwrite Pattern: - This field is ignored unless the Sanitize Action field in - Command Dword 10 is set to 011b (i.e., Overwrite). This field - specifies a 32-bit pattern that is used for the Overwrite - sanitize operation. -

-
-
-
-
-
-

EXAMPLES

-
-
    -
  • -

    -Has the program issue Sanitize Command : -

    -
    -
    -
    # nvme sanitize /dev/nvme0n1 -a 0x02
    -# nvme sanitize /dev/nvme0n1 --sanact=0x01
    -
    -
  • -
-
-
-
-

NVME

-
-

Part of the nvme-user suite.

-
-
-
-

- - - + + + + + + +nvme-sanitize(1) + + + + + +
+
+

SYNOPSIS

+
+
+
nvme sanitize <device> [--no-dealloc | -d]
+              [--oipbp | -i]
+              [--owpass=<overwrite-pass-count> | -n <overwrite-pass-count>]
+              [--ause | -u]
+              [--sanact=<action> | -a <action>]
+              [--ovrpat=<overwrite-pattern> | -p <overwrite-pattern>]
+              [--force]
+
+
+
+
+
+

DESCRIPTION

+
+

For the NVMe device given, sends a Sanitize command and +provides the result.

+

The <device> parameter is mandatory NVMe character device (ex: /dev/nvme0).

+

On success it returns 0, error code otherwise.

+
+
+
+

OPTIONS

+
+
+
+-d +
+
+--no-delloc +
+
+

+ No Deallocate After Sanitize: + If set, then the controller shall not deallocate any logical + blocks as a result of successfully completing the sanitize + operation. If cleared, then the controller should deallocate + logical blocks as a result of successfully completing the + sanitize operation. This bit shall be ignored if the Sanitize + Action field is set to 001b (i.e., Exit Failure Mode). +

+
+
+-i +
+
+--oipbp +
+
+

+ Overwrite Invert Pattern Between Passes: + If set, then the Overwrite Pattern shall be inverted between + passes. If cleared, then the overwrite pattern shall not be + inverted between passes. This bit shall be ignored unless the + Sanitize Action field is set to 011b (i.e., Overwrite). +

+
+
+-n <overwrite-pass-count> +
+
+--owpass=<overwrite-pass-count> +
+
+

+ Overwrite Pass Count: + This field specifies the number of overwrite passes (i.e., + how many times the media is to be overwritten) using the data + from the Overwrite Pattern field of this command. A value of 0 + specifies 16 overwrite passes. This field shall be ignored + unless the Sanitize Action field is set to 011b (i.e., Overwrite). +

+
+
+-u +
+
+--ause +
+
+

+ Allow Unrestricted Sanitize Exit: + If set, then the sanitize operation is performed in unrestricted + completion mode. If cleared then the sanitize operation is + performed in restricted completion mode. This bit shall be ignored + if the Sanitize Action field is set to 001b (i.e., Exit Failure Mode). +

+
+
+-a <action> +
+
+--sanact=<action> +
+
+

+ Sanitize Action: + 000b - Reserved + 001b - Exit Failure Mode + 010b - Start a Block Erase sanitize operation + 011b - Start an Overwrite sanitize operation + 100b - Start a Crypto Erase sanitize operation +

+
+
+-p <overwrite-pattern> +
+
+--ovrpat=<overwrite-pattern> +
+
+

+ Overwrite Pattern: + This field is ignored unless the Sanitize Action field in + Command Dword 10 is set to 011b (i.e., Overwrite). This field + specifies a 32-bit pattern that is used for the Overwrite + sanitize operation. +

+
+
+--force +
+
+

+ Ignore namespace is currently busy and perfome the operation + even though. +

+
+
+
+
+
+

EXAMPLES

+
+
    +
  • +

    +Has the program issue Sanitize Command : +

    +
    +
    +
    # nvme sanitize /dev/nvme0n1 -a 0x02
    +# nvme sanitize /dev/nvme0n1 --sanact=0x01
    +
    +
  • +
+
+
+
+

NVME

+
+

Part of the nvme-user suite.

+
+
+
+

+ + + diff --git a/Documentation/nvme-sanitize.txt b/Documentation/nvme-sanitize.txt index b1d9a0eb..be489d3f 100644 --- a/Documentation/nvme-sanitize.txt +++ b/Documentation/nvme-sanitize.txt @@ -14,6 +14,7 @@ SYNOPSIS [--ause | -u] [--sanact= | -a ] [--ovrpat= | -p ] + [--force] DESCRIPTION ----------- @@ -78,6 +79,10 @@ OPTIONS specifies a 32-bit pattern that is used for the Overwrite sanitize operation. +--force:: + Ignore namespace is currently busy and perfome the operation + even though. + EXAMPLES -------- * Has the program issue Sanitize Command : diff --git a/Documentation/nvme-write-uncor.1 b/Documentation/nvme-write-uncor.1 index 93e75111..e9723dbd 100644 --- a/Documentation/nvme-write-uncor.1 +++ b/Documentation/nvme-write-uncor.1 @@ -2,12 +2,12 @@ .\" Title: nvme-uncor .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 10/20/2020 +.\" Date: 12/15/2021 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-UNCOR" "1" "10/20/2020" "NVMe" "NVMe Manual" +.TH "NVME\-UNCOR" "1" "12/15/2021" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,6 +35,7 @@ nvme-write-uncor \- Send an NVMe write uncorrectable command, return results \fInvme\-write\-uncorr\fR [\-\-start\-block= | \-s ] [\-\-block\-count= | \-c ] [\-\-namespace\-id= | \-n ] + [\-\-force] .fi .SH "DESCRIPTION" .sp @@ -55,6 +56,11 @@ Number of logical blocks to write uncorrectable\&. .RS 4 Namespace ID use in the command\&. .RE +.PP +\-\-force +.RS 4 +Ignore namespace is currently busy and perfome the operation even though\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-write-uncor.html b/Documentation/nvme-write-uncor.html index 7df26b2d..a691f7c4 100644 --- a/Documentation/nvme-write-uncor.html +++ b/Documentation/nvme-write-uncor.html @@ -1,9 +1,10 @@ + - + nvme-uncor(1)