From: Keith Busch
Date: Mon, 8 Jun 2015 18:40:10 +0000 (-0600)
Subject: Add create namespace sub command
X-Git-Tag: v0.1~34
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e94765f6a607136f9edf2cff25c40753f656ab6f;p=users%2Fsagi%2Fnvme-cli.git
Add create namespace sub command
This regenerated the entire contents of the manpages as well, and I
didn't feel like splitting these commits.
Signed-off-by: Keith Busch
---
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 83008bc7..f8a6e931 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -37,13 +37,7 @@ ifndef::git-asciidoc-no-roff[]
[listingblock]
{title}
-ifdef::doctype-manpage[]
-
.ft C
-endif::doctype-manpage[]
|
-ifdef::doctype-manpage[]
-
.ft
-endif::doctype-manpage[]
{title#}
endif::git-asciidoc-no-roff[]
@@ -78,9 +72,9 @@ template::[header-declarations]
{mantitle}
{manvolnum}
-Git
-{git_version}
-Git Manual
+NVMe
+{nvme_version}
+NVMe Manual
{manname}
diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1
index 5612a2e4..8bfa1cc1 100644
--- a/Documentation/nvme-admin-passthru.1
+++ b/Documentation/nvme-admin-passthru.1
@@ -2,12 +2,12 @@
.\" Title: nvme-admin-passthru
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 05/29/2015
-.\" Manual: Git Manual
-.\" Source: Git
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ADMIN\-PASSTHR" "1" "05/29/2015" "Git" "Git Manual"
+.TH "NVME\-ADMIN\-PASSTHR" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -124,11 +124,7 @@ The following will run the admin command with opcode=6 and cdw10=1, which coores
.RS 4
.\}
.nf
-
-\&.ft C
# nvme admin\-passthru /dev/nvme0 \-\-opcode=06 \-\-data\-len=4096 \-\-cdw10=1 \-r
-\&.ft
-
.fi
.if n \{\
.RE
@@ -149,11 +145,7 @@ Or if you want to save that structure to a file:
.RS 4
.\}
.nf
-
-\&.ft C
# nvme admin\-passthru /dev/nvme0 \-\-opcode=06 \-\-data\-len=4096 \-\-cdw10=1 \-r \-b > id_ns\&.raw
-\&.ft
-
.fi
.if n \{\
.RE
diff --git a/Documentation/nvme-compare.1 b/Documentation/nvme-compare.1
index 6aa15d34..5af36e03 100644
--- a/Documentation/nvme-compare.1
+++ b/Documentation/nvme-compare.1
@@ -2,12 +2,12 @@
.\" Title: nvme-compare
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-COMPARE" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-COMPARE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-create-ns.1 b/Documentation/nvme-create-ns.1
new file mode 100644
index 00000000..b62d0eba
--- /dev/null
+++ b/Documentation/nvme-create-ns.1
@@ -0,0 +1,77 @@
+'\" t
+.\" Title: nvme-id-ctrl
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.76.1
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
+.\" Language: English
+.\"
+.TH "NVME\-ID\-CTRL" "1" "06/08/2015" "NVMe" "NVMe Manual"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+nvme-create-ns \- Send NVMe Namespace management command to create namespace, returns results\&.
+.SH "SYNOPSIS"
+.sp
+.nf
+\fInvme create\-ns\fR [\-\-nsze= | \-n ]
+ [\-\-ncap= | \-c ]
+ [\-\-flbas= | \-f ]
+ [\-\-dps= | \-d ]
+ [\-\-nmic= | \-m ]
+.fi
+.SH "DESCRIPTION"
+.sp
+For the NVMe device given, sends a namespace management command to create the namespace with the requested settings\&. On success, the namespace identifier assigned by the controller is returned\&.
+.sp
+The parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1)\&.
+.SH "OPTIONS"
+.PP
+\-s, \-\-nsze
+.RS 4
+The namespace size\&.
+.RE
+.PP
+\-c, \-\-ncap
+.RS 4
+The namespace capacity\&.
+.RE
+.PP
+\-f, \-\-flbas
+.RS 4
+The namespace formatted logical block size setting\&.
+.RE
+.PP
+\-d, \-\-dps
+.RS 4
+The data protection settings\&.
+.RE
+.PP
+\-m, \-\-nmic
+.RS 4
+Namespace multipath and sharing capabilities\&.
+.RE
+.SH "EXAMPLES"
+.sp
+No examples provided yet\&.
+.SH "NVME"
+.sp
+Part of the nvme\-user suite
diff --git a/Documentation/nvme-create-ns.html b/Documentation/nvme-create-ns.html
new file mode 100644
index 00000000..f3c26324
--- /dev/null
+++ b/Documentation/nvme-create-ns.html
@@ -0,0 +1,856 @@
+
+
+
+
+
+nvme-id-ctrl(1)
+
+
+
+
+
+
+
+
SYNOPSIS
+
+
+
nvme create-ns <device> [--nsze=<nsze> | -n <nsze>]
+ [--ncap=<ncap> | -c <ncap>]
+ [--flbas=<flbas> | -f <flbas>]
+ [--dps=<dps> | -d <dps>]
+ [--nmic=<nmic> | -m <nmic>]
+
+
+
+
+
+
DESCRIPTION
+
+
For the NVMe device given, sends a namespace management command to create
+the namespace with the requested settings. On success, the namespace
+identifier assigned by the controller is returned.
+
The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).
+
+
+
+
OPTIONS
+
+
+-
+-s
+
+-
+--nsze
+
+-
+
+ The namespace size.
+
+
+-
+-c
+
+-
+--ncap
+
+-
+
+ The namespace capacity.
+
+
+-
+-f
+
+-
+--flbas
+
+-
+
+ The namespace formatted logical block size setting.
+
+
+-
+-d
+
+-
+--dps
+
+-
+
+ The data protection settings.
+
+
+-
+-m
+
+-
+--nmic
+
+-
+
+ Namespace multipath and sharing capabilities.
+
+
+
+
+
+
+
EXAMPLES
+
+
No examples provided yet.
+
+
+
+
NVME
+
+
Part of the nvme-user suite
+
+
+
+
+
+
+
diff --git a/Documentation/nvme-create-ns.txt b/Documentation/nvme-create-ns.txt
new file mode 100644
index 00000000..99b9d66c
--- /dev/null
+++ b/Documentation/nvme-create-ns.txt
@@ -0,0 +1,55 @@
+nvme-id-ctrl(1)
+===============
+
+NAME
+----
+nvme-create-ns - Send NVMe Namespace management command to create namespace, returns results.
+
+SYNOPSIS
+--------
+[verse]
+'nvme create-ns' [--nsze= | -n ]
+ [--ncap= | -c ]
+ [--flbas= | -f ]
+ [--dps= | -d ]
+ [--nmic= | -m ]
+
+DESCRIPTION
+-----------
+For the NVMe device given, sends a namespace management command to create
+the namespace with the requested settings. On success, the namespace
+identifier assigned by the controller is returned.
+
+The parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).
+
+OPTIONS
+-------
+-s::
+--nsze::
+ The namespace size.
+
+-c::
+--ncap::
+ The namespace capacity.
+
+-f::
+--flbas::
+ The namespace formatted logical block size setting.
+
+-d::
+--dps::
+ The data protection settings.
+
+-m::
+--nmic::
+ Namespace multipath and sharing capabilities.
+
+
+EXAMPLES
+--------
+No examples provided yet.
+
+NVME
+----
+Part of the nvme-user suite
diff --git a/Documentation/nvme-error-log.1 b/Documentation/nvme-error-log.1
index 1d8c06d7..9e863a3d 100644
--- a/Documentation/nvme-error-log.1
+++ b/Documentation/nvme-error-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-error-log
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 05/08/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ERROR\-LOG" "1" "05/08/2015" "\ \&" "\ \&"
+.TH "NVME\-ERROR\-LOG" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-flush.1 b/Documentation/nvme-flush.1
index 25c32233..486236b5 100644
--- a/Documentation/nvme-flush.1
+++ b/Documentation/nvme-flush.1
@@ -2,12 +2,12 @@
.\" Title: nvme-flush
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FLUSH" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-FLUSH" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-format.1 b/Documentation/nvme-format.1
index b2698680..e7f93d9a 100644
--- a/Documentation/nvme-format.1
+++ b/Documentation/nvme-format.1
@@ -2,12 +2,12 @@
.\" Title: nvme-format
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FORMAT" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-FORMAT" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fw-activate.1 b/Documentation/nvme-fw-activate.1
index 22b569b2..c4b606b3 100644
--- a/Documentation/nvme-fw-activate.1
+++ b/Documentation/nvme-fw-activate.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fw-activate
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FW\-ACTIVATE" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-FW\-ACTIVATE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fw-download.1 b/Documentation/nvme-fw-download.1
index e55e2b93..e38900c7 100644
--- a/Documentation/nvme-fw-download.1
+++ b/Documentation/nvme-fw-download.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fw-download
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FW\-DOWNLOAD" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-FW\-DOWNLOAD" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fw-log.1 b/Documentation/nvme-fw-log.1
index db51da4f..fe2004df 100644
--- a/Documentation/nvme-fw-log.1
+++ b/Documentation/nvme-fw-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fw-log
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FW\-LOG" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-FW\-LOG" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-get-feature.1 b/Documentation/nvme-get-feature.1
index a974681f..0a315e32 100644
--- a/Documentation/nvme-get-feature.1
+++ b/Documentation/nvme-get-feature.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-feature
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-FEATURE" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-GET\-FEATURE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-get-log.1 b/Documentation/nvme-get-log.1
index 528eded4..4b9fdeb3 100644
--- a/Documentation/nvme-get-log.1
+++ b/Documentation/nvme-get-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-log
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 05/08/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-LOG" "1" "05/08/2015" "\ \&" "\ \&"
+.TH "NVME\-GET\-LOG" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-get-ns-id.1 b/Documentation/nvme-get-ns-id.1
index b76cecdb..3ba4ba3a 100644
--- a/Documentation/nvme-get-ns-id.1
+++ b/Documentation/nvme-get-ns-id.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-ns-id
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-NS\-ID" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-GET\-NS\-ID" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-help.1 b/Documentation/nvme-help.1
index 665e6801..588ab7f2 100644
--- a/Documentation/nvme-help.1
+++ b/Documentation/nvme-help.1
@@ -2,12 +2,12 @@
.\" Title: nvme-help
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-HELP" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-HELP" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-id-ctrl.1 b/Documentation/nvme-id-ctrl.1
index 1b4ff52e..00a74a67 100644
--- a/Documentation/nvme-id-ctrl.1
+++ b/Documentation/nvme-id-ctrl.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: nvme-id-ctrl
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 05/11/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Generator: DocBook XSL Stylesheets v1.76.1
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-CTRL" "1" "05/11/2015" "\ \&" "\ \&"
+.TH "NVME\-ID\-CTRL" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-id-ns.1 b/Documentation/nvme-id-ns.1
index f9b6a4fb..f857a592 100644
--- a/Documentation/nvme-id-ns.1
+++ b/Documentation/nvme-id-ns.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: nvme-id-ns
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 05/11/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Generator: DocBook XSL Stylesheets v1.76.1
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "05/11/2015" "\ \&" "\ \&"
+.TH "NVME\-ID\-NS" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-io-passthru.1 b/Documentation/nvme-io-passthru.1
index 29a696e5..e53283a2 100644
--- a/Documentation/nvme-io-passthru.1
+++ b/Documentation/nvme-io-passthru.1
@@ -2,12 +2,12 @@
.\" Title: nvme-io-passthru
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/06/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-IO\-PASSTHRU" "1" "02/06/2015" "\ \&" "\ \&"
+.TH "NVME\-IO\-PASSTHRU" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list-ctrl.1 b/Documentation/nvme-list-ctrl.1
index 820d72b6..811eefda 100644
--- a/Documentation/nvme-list-ctrl.1
+++ b/Documentation/nvme-list-ctrl.1
@@ -3,11 +3,11 @@
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
.\" Date: 06/08/2015
-.\" Manual: Git Manual
-.\" Source: Git
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "06/08/2015" "Git" "Git Manual"
+.TH "NVME\-ID\-NS" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list-ns.1 b/Documentation/nvme-list-ns.1
index 0287632a..a4138900 100644
--- a/Documentation/nvme-list-ns.1
+++ b/Documentation/nvme-list-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-ns
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/09/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "02/09/2015" "\ \&" "\ \&"
+.TH "NVME\-ID\-NS" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list.1 b/Documentation/nvme-list.1
index 2ecdcbfe..6a36563c 100644
--- a/Documentation/nvme-list.1
+++ b/Documentation/nvme-list.1
@@ -2,12 +2,12 @@
.\" Title: nvme-list
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/09/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LIST" "1" "02/09/2015" "\ \&" "\ \&"
+.TH "NVME\-LIST" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-read.1 b/Documentation/nvme-read.1
index da0b8797..b7cd175f 100644
--- a/Documentation/nvme-read.1
+++ b/Documentation/nvme-read.1
@@ -2,12 +2,12 @@
.\" Title: nvme-compare
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/09/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-COMPARE" "1" "02/09/2015" "\ \&" "\ \&"
+.TH "NVME\-COMPARE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-acquire.1 b/Documentation/nvme-resv-acquire.1
index eba9eeac..d1f8804d 100644
--- a/Documentation/nvme-resv-acquire.1
+++ b/Documentation/nvme-resv-acquire.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-acquire
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-ACQUIRE" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-RESV\-ACQUIRE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-register.1 b/Documentation/nvme-resv-register.1
index 708eb620..aa3bf43c 100644
--- a/Documentation/nvme-resv-register.1
+++ b/Documentation/nvme-resv-register.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-register
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/09/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-REGISTER" "1" "02/09/2015" "\ \&" "\ \&"
+.TH "NVME\-RESV\-REGISTER" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-release.1 b/Documentation/nvme-resv-release.1
index 1341eb84..d3728127 100644
--- a/Documentation/nvme-resv-release.1
+++ b/Documentation/nvme-resv-release.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-release
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-RELEASE" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-RESV\-RELEASE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-report.1 b/Documentation/nvme-resv-report.1
index 9e879a9e..227d5b86 100644
--- a/Documentation/nvme-resv-report.1
+++ b/Documentation/nvme-resv-report.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-report
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-REPORT" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-RESV\-REPORT" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-security-recv.1 b/Documentation/nvme-security-recv.1
index e2a6f5c6..ede4d6b2 100644
--- a/Documentation/nvme-security-recv.1
+++ b/Documentation/nvme-security-recv.1
@@ -2,12 +2,12 @@
.\" Title: nvme-security-recv
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SECURITY\-RECV" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-SECURITY\-RECV" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-security-send.1 b/Documentation/nvme-security-send.1
index 74098d25..4081b16a 100644
--- a/Documentation/nvme-security-send.1
+++ b/Documentation/nvme-security-send.1
@@ -2,12 +2,12 @@
.\" Title: nvme-security-send
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SECURITY\-SEND" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-SECURITY\-SEND" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-set-feature.1 b/Documentation/nvme-set-feature.1
index 94b5f70f..a6b24d30 100644
--- a/Documentation/nvme-set-feature.1
+++ b/Documentation/nvme-set-feature.1
@@ -2,12 +2,12 @@
.\" Title: nvme-set-feature
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 03/20/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SET\-FEATURE" "1" "03/20/2015" "\ \&" "\ \&"
+.TH "NVME\-SET\-FEATURE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-show-regs.1 b/Documentation/nvme-show-regs.1
index 0910848c..076c1465 100644
--- a/Documentation/nvme-show-regs.1
+++ b/Documentation/nvme-show-regs.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-ns
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-ID\-NS" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-smart-log.1 b/Documentation/nvme-smart-log.1
index 72a78fd2..c18aa434 100644
--- a/Documentation/nvme-smart-log.1
+++ b/Documentation/nvme-smart-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-smart-log
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/02/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SMART\-LOG" "1" "02/02/2015" "\ \&" "\ \&"
+.TH "NVME\-SMART\-LOG" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-write.1 b/Documentation/nvme-write.1
index 5740f82c..0614bfa6 100644
--- a/Documentation/nvme-write.1
+++ b/Documentation/nvme-write.1
@@ -2,12 +2,12 @@
.\" Title: nvme-compare
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 02/09/2015
-.\" Manual: \ \&
-.\" Source: \ \&
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-COMPARE" "1" "02/09/2015" "\ \&" "\ \&"
+.TH "NVME\-COMPARE" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme.1 b/Documentation/nvme.1
index ebaa03e5..e8193c6d 100644
--- a/Documentation/nvme.1
+++ b/Documentation/nvme.1
@@ -2,12 +2,12 @@
.\" Title: nvme
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1
-.\" Date: 05/29/2015
-.\" Manual: Git Manual
-.\" Source: Git
+.\" Date: 06/08/2015
+.\" Manual: NVMe Manual
+.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME" "1" "05/29/2015" "Git" "Git Manual"
+.TH "NVME" "1" "06/08/2015" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -45,142 +45,147 @@ The utility has sub\-commands for all admin and io commands defined in the speci
.SH "NVME CLI SUB-COMMANDS"
.SS "Main commands"
.PP
-linknvme:nvme\-admin\-passthru
+\fBnvme-admin-passthru\fR(1)
.RS 4
Admin Passthrough Comand
.RE
.PP
-linknvme:nvme\-compare
+\fBnvme-compare\fR(1)
.RS 4
IO Compare
.RE
.PP
-linknvme:nvme\-error\-log
+\fBnvme-error-log\fR(1)
.RS 4
Retrieve error logs
.RE
.PP
-linknvme:nvme\-flush
+\fBnvme-flush\fR(1)
.RS 4
Submit flush
.RE
.PP
-linknvme:nvme\-format
+\fBnvme-format\fR(1)
.RS 4
Format namespace(s)
.RE
.PP
-linknvme:nvme\-fw\-activate
+\fBnvme-fw-activate\fR(1)
.RS 4
F/W Activate
.RE
.PP
-linknvme:nvme\-fw\-download
+\fBnvme-fw-download\fR(1)
.RS 4
F/W Download
.RE
.PP
-linknvme:nvme\-fw\-log
+\fBnvme-fw-log\fR(1)
.RS 4
Retrieve f/w log
.RE
.PP
-linknvme:nvme\-get\-feature
+\fBnvme-get-feature\fR(1)
.RS 4
Get Features
.RE
.PP
-linknvme:nvme\-get\-log
+\fBnvme-get-log\fR(1)
.RS 4
Generic Get Log
.RE
.PP
-linknvme:nvme\-smart\-log
+\fBnvme-smart-log\fR(1)
.RS 4
Retrieve Smart Log
.RE
.PP
-linknvme:nvme\-get\-ns\-id
+\fBnvme-get-ns-id\fR(1)
.RS 4
Retrieve namespace identifier
.RE
.PP
-linknvme:nvme\-help
+\fBnvme-help\fR(1)
.RS 4
NVMe CLI Help
.RE
.PP
-linknvme:nvme\-id\-ctrl
+\fBnvme-id-ctrl\fR(1)
.RS 4
Identify Controller
.RE
.PP
-linknvme:nvme\-id\-ns
+\fBnvme-id-ns\fR(1)
.RS 4
Identify Namespace
.RE
.PP
-linknvme:nvme\-io\-passthru
+\fBnvme-io-passthru\fR(1)
.RS 4
IO Passthrough Command
.RE
.PP
-linknvme:nvme\-list\-ns
+\fBnvme-list-ns\fR(1)
.RS 4
List all nvme namespaces
.RE
.PP
-linknvme:nvme\-list
+\fBnvme-list\fR(1)
.RS 4
List all nvme controllers
.RE
.PP
-linknvme:nvme\-read
+\fBnvme-list-ctrl\fR(1)
+.RS 4
+List controller in NVMe subsystem
+.RE
+.PP
+\fBnvme-read\fR(1)
.RS 4
Issue IO Read Command
.RE
.PP
-linknvme:nvme\-write
+\fBnvme-write\fR(1)
.RS 4
Issue IO Write Command
.RE
.PP
-linknvme:nvme\-resv\-acquire
+\fBnvme-resv-acquire\fR(1)
.RS 4
Acquire Namespace Reservation
.RE
.PP
-linknvme:nvme\-resv\-register
+\fBnvme-resv-register\fR(1)
.RS 4
Register Namespace Reservation
.RE
.PP
-linknvme:nvme\-resv\-release
+\fBnvme-resv-release\fR(1)
.RS 4
Release Namespace Reservation
.RE
.PP
-linknvme:nvme\-resv\-report
+\fBnvme-resv-report\fR(1)
.RS 4
Report Reservation Capabilities
.RE
.PP
-linknvme:nvme\-security\-recv
+\fBnvme-security-recv\fR(1)
.RS 4
Security Receive
.RE
.PP
-linknvme:nvme\-security\-send
+\fBnvme-security-send\fR(1)
.RS 4
Security Send
.RE
.PP
-linknvme:nvme\-set\-feature
+\fBnvme-set-feature\fR(1)
.RS 4
Set Feature
.RE
.PP
-linknvme:nvme\-show\-regs
+\fBnvme-show-regs\fR(1)
.RS 4
Show NVMe Controller Registers
.RE
diff --git a/Documentation/nvme.html b/Documentation/nvme.html
index e5423cf2..997c69c7 100644
--- a/Documentation/nvme.html
+++ b/Documentation/nvme.html
@@ -927,6 +927,14 @@ available, run "nvme help".
+nvme-list-ctrl(1)
+
+
+
+ List controller in NVMe subsystem
+
+
+
nvme-read(1)
diff --git a/nvme.c b/nvme.c
index 2c6e62bc..0accfcda 100644
--- a/nvme.c
+++ b/nvme.c
@@ -60,6 +60,8 @@ static const char *devicename;
ENTRY(ID_CTRL, "id-ctrl", "Send NVMe Identify Controller", id_ctrl) \
ENTRY(ID_NS, "id-ns", "Send NVMe Identify Namespace, display structure", id_ns) \
ENTRY(LIST_NS, "list-ns", "Send NVMe Identify List, display structure", list_ns) \
+ ENTRY(CREATE_NS, "create-ns", "Creates a namespace with the provided parameters", create_ns) \
+ ENTRY(DELETE_NS, "create-ns", "Deletes a namespace from the controller", delete_ns) \
ENTRY(LIST_CTRL, "list-ctrl", "Send NVMe Identify Controller List, display structure", list_ctrl) \
ENTRY(GET_NS_ID, "get-ns-id", "Retrieve the namespace ID of opened block device", get_ns_id) \
ENTRY(GET_LOG, "get-log", "Generic NVMe get log, returns log in raw format", get_log) \
@@ -1182,14 +1184,14 @@ static int list_ctrl(int argc, char **argv)
if (posix_memalign((void *)&cntlist, getpagesize(), 0x1000))
return ENOMEM;
- err = identify(0, cntlist, defaults.cntid << 16 | 0x13);
+ err = identify(0, cntlist, cfg.cntid << 16 | 0x13);
if (!err) {
for (i = 0; i < (min(cntlist->num, 2048)); i++)
printf("[%4u]:%#x\n", i, cntlist->identifier[i]);
}
else if (err > 0)
fprintf(stderr, "NVMe Status:%s(%x) cntid:%d\n",
- nvme_status_to_string(err), err, defaults.cntid);
+ nvme_status_to_string(err), err, cfg.cntid);
return err;
}
@@ -1228,6 +1230,71 @@ static int list_ns(int argc, char **argv)
return err;
}
+static int delete_ns(int argc, char **argv)
+{
+ return 0;
+}
+
+static int create_ns(int argc, char **argv)
+{
+ struct nvme_admin_cmd cmd;
+ struct nvme_id_ns *ns;
+ int err = 0;
+
+ struct config {
+ __u64 nsze;
+ __u64 ncap;
+ __u8 flbas;
+ __u8 dps;
+ __u8 nmic;
+ };
+ struct config cfg;
+
+ const struct config defaults = {
+ };
+
+ const struct argconfig_commandline_options command_line_options[] = {
+ {"nsze", "NUM", CFG_POSITIVE, &defaults.nsze, required_argument, NULL},
+ {"s", "NUM", CFG_POSITIVE, &defaults.nsze, required_argument, NULL},
+ {"ncap", "NUM", CFG_POSITIVE, &defaults.ncap, required_argument, NULL},
+ {"c", "NUM", CFG_POSITIVE, &defaults.ncap, required_argument, NULL},
+ {"flbas", "NUM", CFG_POSITIVE, &defaults.flbas, required_argument, NULL},
+ {"f", "NUM", CFG_POSITIVE, &defaults.flbas, required_argument, NULL},
+ {"dps", "NUM", CFG_POSITIVE, &defaults.dps, required_argument, NULL},
+ {"d", "NUM", CFG_POSITIVE, &defaults.dps, required_argument, NULL},
+ {"nmic", "NUM", CFG_POSITIVE, &defaults.nmic, required_argument, NULL},
+ {"m", "NUM", CFG_POSITIVE, &defaults.nmic, required_argument, NULL},
+ {0}
+ };
+ argconfig_parse(argc, argv, "create_ns", command_line_options,
+ &defaults, &cfg, sizeof(cfg));
+ get_dev(1, argc, argv);
+
+ if (posix_memalign((void *)&ns, getpagesize(), 4096))
+ return -ENOMEM;
+ memset(ns, 0, sizeof(*ns));
+ memset(&cmd, 0, sizeof(cmd));
+
+ ns->nsze = cfg.nsze;
+ ns->ncap = cfg.ncap;
+ ns->flbas = cfg.flbas;
+ ns->dps = cfg.dps;
+ ns->nmic = cfg.nmic;
+
+ cmd.opcode = nvme_admin_ns_mgmt;
+ cmd.addr = (unsigned long)ns;
+ cmd.data_len = 4096;
+
+ err = ioctl(fd, NVME_IOCTL_ADMIN_CMD, &cmd);
+ if (!err)
+ printf("%s: Success, created nsid:%d\n", commands[CREATE_NS].name,
+ cmd.result);
+ else if (err > 0)
+ fprintf(stderr, "NVMe Status:%s(%x)\n",
+ nvme_status_to_string(err), err);
+ return err;
+}
+
static char *nvme_char_from_block(char *block)
{
char slen[16];