]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Add create namespace sub command
authorKeith Busch <keith.busch@intel.com>
Mon, 8 Jun 2015 18:40:10 +0000 (12:40 -0600)
committerKeith Busch <keith.busch@intel.com>
Mon, 8 Jun 2015 18:40:10 +0000 (12:40 -0600)
This regenerated the entire contents of the manpages as well, and I
didn't feel like splitting these commits.

Signed-off-by: Keith Busch <keith.busch@intel.com>
36 files changed:
Documentation/asciidoc.conf
Documentation/nvme-admin-passthru.1
Documentation/nvme-compare.1
Documentation/nvme-create-ns.1 [new file with mode: 0644]
Documentation/nvme-create-ns.html [new file with mode: 0644]
Documentation/nvme-create-ns.txt [new file with mode: 0644]
Documentation/nvme-error-log.1
Documentation/nvme-flush.1
Documentation/nvme-format.1
Documentation/nvme-fw-activate.1
Documentation/nvme-fw-download.1
Documentation/nvme-fw-log.1
Documentation/nvme-get-feature.1
Documentation/nvme-get-log.1
Documentation/nvme-get-ns-id.1
Documentation/nvme-help.1
Documentation/nvme-id-ctrl.1
Documentation/nvme-id-ns.1
Documentation/nvme-io-passthru.1
Documentation/nvme-list-ctrl.1
Documentation/nvme-list-ns.1
Documentation/nvme-list.1
Documentation/nvme-read.1
Documentation/nvme-resv-acquire.1
Documentation/nvme-resv-register.1
Documentation/nvme-resv-release.1
Documentation/nvme-resv-report.1
Documentation/nvme-security-recv.1
Documentation/nvme-security-send.1
Documentation/nvme-set-feature.1
Documentation/nvme-show-regs.1
Documentation/nvme-smart-log.1
Documentation/nvme-write.1
Documentation/nvme.1
Documentation/nvme.html
nvme.c

index 83008bc7942f5e81afe18e2c7ff63253f1ed69be..f8a6e93176382a02079cda20363ac17a27c61dbd 100644 (file)
@@ -37,13 +37,7 @@ ifndef::git-asciidoc-no-roff[]
 [listingblock]
 <example><title>{title}</title>
 <literallayout class="monospaced">
-ifdef::doctype-manpage[]
-&#10;.ft C&#10;
-endif::doctype-manpage[]
 |
-ifdef::doctype-manpage[]
-&#10;.ft&#10;
-endif::doctype-manpage[]
 </literallayout>
 {title#}</example>
 endif::git-asciidoc-no-roff[]
@@ -78,9 +72,9 @@ template::[header-declarations]
 <refmeta>
 <refentrytitle>{mantitle}</refentrytitle>
 <manvolnum>{manvolnum}</manvolnum>
-<refmiscinfo class="source">Git</refmiscinfo>
-<refmiscinfo class="version">{git_version}</refmiscinfo>
-<refmiscinfo class="manual">Git Manual</refmiscinfo>
+<refmiscinfo class="source">NVMe</refmiscinfo>
+<refmiscinfo class="version">{nvme_version}</refmiscinfo>
+<refmiscinfo class="manual">NVMe Manual</refmiscinfo>
 </refmeta>
 <refnamediv>
   <refname>{manname}</refname>
index 5612a2e4b0018fae9669375d6b208f0665f4630b..8bfa1cc1b682a0b36bdbea3ff99fcde7dfe59195 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
index 6aa15d34ff09cc9ae8257bcf5801d0d99d17bbf8..5af36e032afbf40fa3c8c5d99fc46c78b318df4f 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-compare
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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 (file)
index 0000000..b62d0eb
--- /dev/null
@@ -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 <http://docbook.sf.net/>
+.\"      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 <device> [\-\-nsze=<nsze> | \-n <nsze>]
+                        [\-\-ncap=<ncap> | \-c <ncap>]
+                        [\-\-flbas=<flbas> | \-f <flbas>]
+                        [\-\-dps=<dps> | \-d <dps>]
+                        [\-\-nmic=<nmic> | \-m <nmic>]
+.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 <device> 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 (file)
index 0000000..f3c2632
--- /dev/null
@@ -0,0 +1,856 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
+    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
+<meta name="generator" content="AsciiDoc 8.6.7" />\r
+<title>nvme-id-ctrl(1)</title>\r
+<style type="text/css">\r
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */\r
+\r
+/* Default font. */\r
+body {\r
+  font-family: Georgia,serif;\r
+}\r
+\r
+/* Title font. */\r
+h1, h2, h3, h4, h5, h6,\r
+div.title, caption.title,\r
+thead, p.table.header,\r
+#toctitle,\r
+#author, #revnumber, #revdate, #revremark,\r
+#footer {\r
+  font-family: Arial,Helvetica,sans-serif;\r
+}\r
+\r
+body {\r
+  margin: 1em 5% 1em 5%;\r
+}\r
+\r
+a {\r
+  color: blue;\r
+  text-decoration: underline;\r
+}\r
+a:visited {\r
+  color: fuchsia;\r
+}\r
+\r
+em {\r
+  font-style: italic;\r
+  color: navy;\r
+}\r
+\r
+strong {\r
+  font-weight: bold;\r
+  color: #083194;\r
+}\r
+\r
+h1, h2, h3, h4, h5, h6 {\r
+  color: #527bbd;\r
+  margin-top: 1.2em;\r
+  margin-bottom: 0.5em;\r
+  line-height: 1.3;\r
+}\r
+\r
+h1, h2, h3 {\r
+  border-bottom: 2px solid silver;\r
+}\r
+h2 {\r
+  padding-top: 0.5em;\r
+}\r
+h3 {\r
+  float: left;\r
+}\r
+h3 + * {\r
+  clear: left;\r
+}\r
+h5 {\r
+  font-size: 1.0em;\r
+}\r
+\r
+div.sectionbody {\r
+  margin-left: 0;\r
+}\r
+\r
+hr {\r
+  border: 1px solid silver;\r
+}\r
+\r
+p {\r
+  margin-top: 0.5em;\r
+  margin-bottom: 0.5em;\r
+}\r
+\r
+ul, ol, li > p {\r
+  margin-top: 0;\r
+}\r
+ul > li     { color: #aaa; }\r
+ul > li > * { color: black; }\r
+\r
+pre {\r
+  padding: 0;\r
+  margin: 0;\r
+}\r
+\r
+#author {\r
+  color: #527bbd;\r
+  font-weight: bold;\r
+  font-size: 1.1em;\r
+}\r
+#email {\r
+}\r
+#revnumber, #revdate, #revremark {\r
+}\r
+\r
+#footer {\r
+  font-size: small;\r
+  border-top: 2px solid silver;\r
+  padding-top: 0.5em;\r
+  margin-top: 4.0em;\r
+}\r
+#footer-text {\r
+  float: left;\r
+  padding-bottom: 0.5em;\r
+}\r
+#footer-badges {\r
+  float: right;\r
+  padding-bottom: 0.5em;\r
+}\r
+\r
+#preamble {\r
+  margin-top: 1.5em;\r
+  margin-bottom: 1.5em;\r
+}\r
+div.imageblock, div.exampleblock, div.verseblock,\r
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
+div.admonitionblock {\r
+  margin-top: 1.0em;\r
+  margin-bottom: 1.5em;\r
+}\r
+div.admonitionblock {\r
+  margin-top: 2.0em;\r
+  margin-bottom: 2.0em;\r
+  margin-right: 10%;\r
+  color: #606060;\r
+}\r
+\r
+div.content { /* Block element content. */\r
+  padding: 0;\r
+}\r
+\r
+/* Block element titles. */\r
+div.title, caption.title {\r
+  color: #527bbd;\r
+  font-weight: bold;\r
+  text-align: left;\r
+  margin-top: 1.0em;\r
+  margin-bottom: 0.5em;\r
+}\r
+div.title + * {\r
+  margin-top: 0;\r
+}\r
+\r
+td div.title:first-child {\r
+  margin-top: 0.0em;\r
+}\r
+div.content div.title:first-child {\r
+  margin-top: 0.0em;\r
+}\r
+div.content + div.title {\r
+  margin-top: 0.0em;\r
+}\r
+\r
+div.sidebarblock > div.content {\r
+  background: #ffffee;\r
+  border: 1px solid #dddddd;\r
+  border-left: 4px solid #f0f0f0;\r
+  padding: 0.5em;\r
+}\r
+\r
+div.listingblock > div.content {\r
+  border: 1px solid #dddddd;\r
+  border-left: 5px solid #f0f0f0;\r
+  background: #f8f8f8;\r
+  padding: 0.5em;\r
+}\r
+\r
+div.quoteblock, div.verseblock {\r
+  padding-left: 1.0em;\r
+  margin-left: 1.0em;\r
+  margin-right: 10%;\r
+  border-left: 5px solid #f0f0f0;\r
+  color: #888;\r
+}\r
+\r
+div.quoteblock > div.attribution {\r
+  padding-top: 0.5em;\r
+  text-align: right;\r
+}\r
+\r
+div.verseblock > pre.content {\r
+  font-family: inherit;\r
+  font-size: inherit;\r
+}\r
+div.verseblock > div.attribution {\r
+  padding-top: 0.75em;\r
+  text-align: left;\r
+}\r
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */\r
+div.verseblock + div.attribution {\r
+  text-align: left;\r
+}\r
+\r
+div.admonitionblock .icon {\r
+  vertical-align: top;\r
+  font-size: 1.1em;\r
+  font-weight: bold;\r
+  text-decoration: underline;\r
+  color: #527bbd;\r
+  padding-right: 0.5em;\r
+}\r
+div.admonitionblock td.content {\r
+  padding-left: 0.5em;\r
+  border-left: 3px solid #dddddd;\r
+}\r
+\r
+div.exampleblock > div.content {\r
+  border-left: 3px solid #dddddd;\r
+  padding-left: 0.5em;\r
+}\r
+\r
+div.imageblock div.content { padding-left: 0; }\r
+span.image img { border-style: none; }\r
+a.image:visited { color: white; }\r
+\r
+dl {\r
+  margin-top: 0.8em;\r
+  margin-bottom: 0.8em;\r
+}\r
+dt {\r
+  margin-top: 0.5em;\r
+  margin-bottom: 0;\r
+  font-style: normal;\r
+  color: navy;\r
+}\r
+dd > *:first-child {\r
+  margin-top: 0.1em;\r
+}\r
+\r
+ul, ol {\r
+    list-style-position: outside;\r
+}\r
+ol.arabic {\r
+  list-style-type: decimal;\r
+}\r
+ol.loweralpha {\r
+  list-style-type: lower-alpha;\r
+}\r
+ol.upperalpha {\r
+  list-style-type: upper-alpha;\r
+}\r
+ol.lowerroman {\r
+  list-style-type: lower-roman;\r
+}\r
+ol.upperroman {\r
+  list-style-type: upper-roman;\r
+}\r
+\r
+div.compact ul, div.compact ol,\r
+div.compact p, div.compact p,\r
+div.compact div, div.compact div {\r
+  margin-top: 0.1em;\r
+  margin-bottom: 0.1em;\r
+}\r
+\r
+tfoot {\r
+  font-weight: bold;\r
+}\r
+td > div.verse {\r
+  white-space: pre;\r
+}\r
+\r
+div.hdlist {\r
+  margin-top: 0.8em;\r
+  margin-bottom: 0.8em;\r
+}\r
+div.hdlist tr {\r
+  padding-bottom: 15px;\r
+}\r
+dt.hdlist1.strong, td.hdlist1.strong {\r
+  font-weight: bold;\r
+}\r
+td.hdlist1 {\r
+  vertical-align: top;\r
+  font-style: normal;\r
+  padding-right: 0.8em;\r
+  color: navy;\r
+}\r
+td.hdlist2 {\r
+  vertical-align: top;\r
+}\r
+div.hdlist.compact tr {\r
+  margin: 0;\r
+  padding-bottom: 0;\r
+}\r
+\r
+.comment {\r
+  background: yellow;\r
+}\r
+\r
+.footnote, .footnoteref {\r
+  font-size: 0.8em;\r
+}\r
+\r
+span.footnote, span.footnoteref {\r
+  vertical-align: super;\r
+}\r
+\r
+#footnotes {\r
+  margin: 20px 0 20px 0;\r
+  padding: 7px 0 0 0;\r
+}\r
+\r
+#footnotes div.footnote {\r
+  margin: 0 0 5px 0;\r
+}\r
+\r
+#footnotes hr {\r
+  border: none;\r
+  border-top: 1px solid silver;\r
+  height: 1px;\r
+  text-align: left;\r
+  margin-left: 0;\r
+  width: 20%;\r
+  min-width: 100px;\r
+}\r
+\r
+div.colist td {\r
+  padding-right: 0.5em;\r
+  padding-bottom: 0.3em;\r
+  vertical-align: top;\r
+}\r
+div.colist td img {\r
+  margin-top: 0.3em;\r
+}\r
+\r
+@media print {\r
+  #footer-badges { display: none; }\r
+}\r
+\r
+#toc {\r
+  margin-bottom: 2.5em;\r
+}\r
+\r
+#toctitle {\r
+  color: #527bbd;\r
+  font-size: 1.1em;\r
+  font-weight: bold;\r
+  margin-top: 1.0em;\r
+  margin-bottom: 0.1em;\r
+}\r
+\r
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {\r
+  margin-top: 0;\r
+  margin-bottom: 0;\r
+}\r
+div.toclevel2 {\r
+  margin-left: 2em;\r
+  font-size: 0.9em;\r
+}\r
+div.toclevel3 {\r
+  margin-left: 4em;\r
+  font-size: 0.9em;\r
+}\r
+div.toclevel4 {\r
+  margin-left: 6em;\r
+  font-size: 0.9em;\r
+}\r
+\r
+span.aqua { color: aqua; }\r
+span.black { color: black; }\r
+span.blue { color: blue; }\r
+span.fuchsia { color: fuchsia; }\r
+span.gray { color: gray; }\r
+span.green { color: green; }\r
+span.lime { color: lime; }\r
+span.maroon { color: maroon; }\r
+span.navy { color: navy; }\r
+span.olive { color: olive; }\r
+span.purple { color: purple; }\r
+span.red { color: red; }\r
+span.silver { color: silver; }\r
+span.teal { color: teal; }\r
+span.white { color: white; }\r
+span.yellow { color: yellow; }\r
+\r
+span.aqua-background { background: aqua; }\r
+span.black-background { background: black; }\r
+span.blue-background { background: blue; }\r
+span.fuchsia-background { background: fuchsia; }\r
+span.gray-background { background: gray; }\r
+span.green-background { background: green; }\r
+span.lime-background { background: lime; }\r
+span.maroon-background { background: maroon; }\r
+span.navy-background { background: navy; }\r
+span.olive-background { background: olive; }\r
+span.purple-background { background: purple; }\r
+span.red-background { background: red; }\r
+span.silver-background { background: silver; }\r
+span.teal-background { background: teal; }\r
+span.white-background { background: white; }\r
+span.yellow-background { background: yellow; }\r
+\r
+span.big { font-size: 2em; }\r
+span.small { font-size: 0.6em; }\r
+\r
+span.underline { text-decoration: underline; }\r
+span.overline { text-decoration: overline; }\r
+span.line-through { text-decoration: line-through; }\r
+\r
+div.unbreakable { page-break-inside: avoid; }\r
+\r
+\r
+/*\r
+ * xhtml11 specific\r
+ *\r
+ * */\r
+\r
+tt {\r
+  font-family: "Courier New", Courier, monospace;\r
+  font-size: inherit;\r
+  color: navy;\r
+}\r
+\r
+div.tableblock {\r
+  margin-top: 1.0em;\r
+  margin-bottom: 1.5em;\r
+}\r
+div.tableblock > table {\r
+  border: 3px solid #527bbd;\r
+}\r
+thead, p.table.header {\r
+  font-weight: bold;\r
+  color: #527bbd;\r
+}\r
+p.table {\r
+  margin-top: 0;\r
+}\r
+/* Because the table frame attribute is overriden by CSS in most browsers. */\r
+div.tableblock > table[frame="void"] {\r
+  border-style: none;\r
+}\r
+div.tableblock > table[frame="hsides"] {\r
+  border-left-style: none;\r
+  border-right-style: none;\r
+}\r
+div.tableblock > table[frame="vsides"] {\r
+  border-top-style: none;\r
+  border-bottom-style: none;\r
+}\r
+\r
+\r
+/*\r
+ * html5 specific\r
+ *\r
+ * */\r
+\r
+.monospaced {\r
+  font-family: "Courier New", Courier, monospace;\r
+  font-size: inherit;\r
+  color: navy;\r
+}\r
+\r
+table.tableblock {\r
+  margin-top: 1.0em;\r
+  margin-bottom: 1.5em;\r
+}\r
+thead, p.tableblock.header {\r
+  font-weight: bold;\r
+  color: #527bbd;\r
+}\r
+p.tableblock {\r
+  margin-top: 0;\r
+}\r
+table.tableblock {\r
+  border-width: 3px;\r
+  border-spacing: 0px;\r
+  border-style: solid;\r
+  border-color: #527bbd;\r
+  border-collapse: collapse;\r
+}\r
+th.tableblock, td.tableblock {\r
+  border-width: 1px;\r
+  padding: 4px;\r
+  border-style: solid;\r
+  border-color: #527bbd;\r
+}\r
+\r
+table.tableblock.frame-topbot {\r
+  border-left-style: hidden;\r
+  border-right-style: hidden;\r
+}\r
+table.tableblock.frame-sides {\r
+  border-top-style: hidden;\r
+  border-bottom-style: hidden;\r
+}\r
+table.tableblock.frame-none {\r
+  border-style: hidden;\r
+}\r
+\r
+th.tableblock.halign-left, td.tableblock.halign-left {\r
+  text-align: left;\r
+}\r
+th.tableblock.halign-center, td.tableblock.halign-center {\r
+  text-align: center;\r
+}\r
+th.tableblock.halign-right, td.tableblock.halign-right {\r
+  text-align: right;\r
+}\r
+\r
+th.tableblock.valign-top, td.tableblock.valign-top {\r
+  vertical-align: top;\r
+}\r
+th.tableblock.valign-middle, td.tableblock.valign-middle {\r
+  vertical-align: middle;\r
+}\r
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {\r
+  vertical-align: bottom;\r
+}\r
+\r
+\r
+/*\r
+ * manpage specific\r
+ *\r
+ * */\r
+\r
+body.manpage h1 {\r
+  padding-top: 0.5em;\r
+  padding-bottom: 0.5em;\r
+  border-top: 2px solid silver;\r
+  border-bottom: 2px solid silver;\r
+}\r
+body.manpage h2 {\r
+  border-style: none;\r
+}\r
+body.manpage div.sectionbody {\r
+  margin-left: 3em;\r
+}\r
+\r
+@media print {\r
+  body.manpage div#toc { display: none; }\r
+}\r
+</style>\r
+<script type="text/javascript">\r
+/*<![CDATA[*/\r
+var asciidoc = {  // Namespace.\r
+\r
+/////////////////////////////////////////////////////////////////////\r
+// Table Of Contents generator\r
+/////////////////////////////////////////////////////////////////////\r
+\r
+/* Author: Mihai Bazon, September 2002\r
+ * http://students.infoiasi.ro/~mishoo\r
+ *\r
+ * Table Of Content generator\r
+ * Version: 0.4\r
+ *\r
+ * Feel free to use this script under the terms of the GNU General Public\r
+ * License, as long as you do not remove or alter this notice.\r
+ */\r
+\r
+ /* modified by Troy D. Hanson, September 2006. License: GPL */\r
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */\r
+\r
+// toclevels = 1..4.\r
+toc: function (toclevels) {\r
+\r
+  function getText(el) {\r
+    var text = "";\r
+    for (var i = el.firstChild; i != null; i = i.nextSibling) {\r
+      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.\r
+        text += i.data;\r
+      else if (i.firstChild != null)\r
+        text += getText(i);\r
+    }\r
+    return text;\r
+  }\r
+\r
+  function TocEntry(el, text, toclevel) {\r
+    this.element = el;\r
+    this.text = text;\r
+    this.toclevel = toclevel;\r
+  }\r
+\r
+  function tocEntries(el, toclevels) {\r
+    var result = new Array;\r
+    var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');\r
+    // Function that scans the DOM tree for header elements (the DOM2\r
+    // nodeIterator API would be a better technique but not supported by all\r
+    // browsers).\r
+    var iterate = function (el) {\r
+      for (var i = el.firstChild; i != null; i = i.nextSibling) {\r
+        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {\r
+          var mo = re.exec(i.tagName);\r
+          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {\r
+            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);\r
+          }\r
+          iterate(i);\r
+        }\r
+      }\r
+    }\r
+    iterate(el);\r
+    return result;\r
+  }\r
+\r
+  var toc = document.getElementById("toc");\r
+  if (!toc) {\r
+    return;\r
+  }\r
+\r
+  // Delete existing TOC entries in case we're reloading the TOC.\r
+  var tocEntriesToRemove = [];\r
+  var i;\r
+  for (i = 0; i < toc.childNodes.length; i++) {\r
+    var entry = toc.childNodes[i];\r
+    if (entry.nodeName.toLowerCase() == 'div'\r
+     && entry.getAttribute("class")\r
+     && entry.getAttribute("class").match(/^toclevel/))\r
+      tocEntriesToRemove.push(entry);\r
+  }\r
+  for (i = 0; i < tocEntriesToRemove.length; i++) {\r
+    toc.removeChild(tocEntriesToRemove[i]);\r
+  }\r
+\r
+  // Rebuild TOC entries.\r
+  var entries = tocEntries(document.getElementById("content"), toclevels);\r
+  for (var i = 0; i < entries.length; ++i) {\r
+    var entry = entries[i];\r
+    if (entry.element.id == "")\r
+      entry.element.id = "_toc_" + i;\r
+    var a = document.createElement("a");\r
+    a.href = "#" + entry.element.id;\r
+    a.appendChild(document.createTextNode(entry.text));\r
+    var div = document.createElement("div");\r
+    div.appendChild(a);\r
+    div.className = "toclevel" + entry.toclevel;\r
+    toc.appendChild(div);\r
+  }\r
+  if (entries.length == 0)\r
+    toc.parentNode.removeChild(toc);\r
+},\r
+\r
+\r
+/////////////////////////////////////////////////////////////////////\r
+// Footnotes generator\r
+/////////////////////////////////////////////////////////////////////\r
+\r
+/* Based on footnote generation code from:\r
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html\r
+ */\r
+\r
+footnotes: function () {\r
+  // Delete existing footnote entries in case we're reloading the footnodes.\r
+  var i;\r
+  var noteholder = document.getElementById("footnotes");\r
+  if (!noteholder) {\r
+    return;\r
+  }\r
+  var entriesToRemove = [];\r
+  for (i = 0; i < noteholder.childNodes.length; i++) {\r
+    var entry = noteholder.childNodes[i];\r
+    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")\r
+      entriesToRemove.push(entry);\r
+  }\r
+  for (i = 0; i < entriesToRemove.length; i++) {\r
+    noteholder.removeChild(entriesToRemove[i]);\r
+  }\r
+\r
+  // Rebuild footnote entries.\r
+  var cont = document.getElementById("content");\r
+  var spans = cont.getElementsByTagName("span");\r
+  var refs = {};\r
+  var n = 0;\r
+  for (i=0; i<spans.length; i++) {\r
+    if (spans[i].className == "footnote") {\r
+      n++;\r
+      var note = spans[i].getAttribute("data-note");\r
+      if (!note) {\r
+        // Use [\s\S] in place of . so multi-line matches work.\r
+        // Because JavaScript has no s (dotall) regex flag.\r
+        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];\r
+        spans[i].innerHTML =\r
+          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +\r
+          "' title='View footnote' class='footnote'>" + n + "</a>]";\r
+        spans[i].setAttribute("data-note", note);\r
+      }\r
+      noteholder.innerHTML +=\r
+        "<div class='footnote' id='_footnote_" + n + "'>" +\r
+        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +\r
+        n + "</a>. " + note + "</div>";\r
+      var id =spans[i].getAttribute("id");\r
+      if (id != null) refs["#"+id] = n;\r
+    }\r
+  }\r
+  if (n == 0)\r
+    noteholder.parentNode.removeChild(noteholder);\r
+  else {\r
+    // Process footnoterefs.\r
+    for (i=0; i<spans.length; i++) {\r
+      if (spans[i].className == "footnoteref") {\r
+        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");\r
+        href = href.match(/#.*/)[0];  // Because IE return full URL.\r
+        n = refs[href];\r
+        spans[i].innerHTML =\r
+          "[<a href='#_footnote_" + n +\r
+          "' title='View footnote' class='footnote'>" + n + "</a>]";\r
+      }\r
+    }\r
+  }\r
+},\r
+\r
+install: function(toclevels) {\r
+  var timerId;\r
+\r
+  function reinstall() {\r
+    asciidoc.footnotes();\r
+    if (toclevels) {\r
+      asciidoc.toc(toclevels);\r
+    }\r
+  }\r
+\r
+  function reinstallAndRemoveTimer() {\r
+    clearInterval(timerId);\r
+    reinstall();\r
+  }\r
+\r
+  timerId = setInterval(reinstall, 500);\r
+  if (document.addEventListener)\r
+    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);\r
+  else\r
+    window.onload = reinstallAndRemoveTimer;\r
+}\r
+\r
+}\r
+asciidoc.install();\r
+/*]]>*/\r
+</script>\r
+</head>\r
+<body class="manpage">\r
+<div id="header">\r
+<h1>\r
+nvme-id-ctrl(1) Manual Page\r
+</h1>\r
+<h2>NAME</h2>\r
+<div class="sectionbody">\r
+<p>nvme-create-ns -\r
+   Send NVMe Namespace management command to create namespace, returns results.\r
+</p>\r
+</div>\r
+</div>\r
+<div id="content">\r
+<div class="sect1">\r
+<h2 id="_synopsis">SYNOPSIS</h2>\r
+<div class="sectionbody">\r
+<div class="verseblock">\r
+<pre class="content"><em>nvme create-ns</em> &lt;device&gt; [--nsze=&lt;nsze&gt; | -n &lt;nsze&gt;]\r
+                        [--ncap=&lt;ncap&gt; | -c &lt;ncap&gt;]\r
+                        [--flbas=&lt;flbas&gt; | -f &lt;flbas&gt;]\r
+                        [--dps=&lt;dps&gt; | -d &lt;dps&gt;]\r
+                        [--nmic=&lt;nmic&gt; | -m &lt;nmic&gt;]</pre>\r
+<div class="attribution">\r
+</div></div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
+<h2 id="_description">DESCRIPTION</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>For the NVMe device given, sends a namespace management command to create\r
+the namespace with the requested settings. On success, the namespace\r
+identifier assigned by the controller is returned.</p></div>\r
+<div class="paragraph"><p>The &lt;device&gt; parameter is mandatory and may be either the NVMe character\r
+device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
+<h2 id="_options">OPTIONS</h2>\r
+<div class="sectionbody">\r
+<div class="dlist"><dl>\r
+<dt class="hdlist1">\r
+-s\r
+</dt>\r
+<dt class="hdlist1">\r
+--nsze\r
+</dt>\r
+<dd>\r
+<p>\r
+        The namespace size.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+-c\r
+</dt>\r
+<dt class="hdlist1">\r
+--ncap\r
+</dt>\r
+<dd>\r
+<p>\r
+        The namespace capacity.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+-f\r
+</dt>\r
+<dt class="hdlist1">\r
+--flbas\r
+</dt>\r
+<dd>\r
+<p>\r
+        The namespace formatted logical block size setting.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+-d\r
+</dt>\r
+<dt class="hdlist1">\r
+--dps\r
+</dt>\r
+<dd>\r
+<p>\r
+        The data protection settings.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+-m\r
+</dt>\r
+<dt class="hdlist1">\r
+--nmic\r
+</dt>\r
+<dd>\r
+<p>\r
+        Namespace multipath and sharing capabilities.\r
+</p>\r
+</dd>\r
+</dl></div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
+<h2 id="_examples">EXAMPLES</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>No examples provided yet.</p></div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
+<h2 id="_nvme">NVME</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>Part of the nvme-user suite</p></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div id="footnotes"><hr /></div>\r
+<div id="footer">\r
+<div id="footer-text">\r
+Last updated 2015-06-08 12:30:42 MDT\r
+</div>\r
+</div>\r
+</body>\r
+</html>\r
diff --git a/Documentation/nvme-create-ns.txt b/Documentation/nvme-create-ns.txt
new file mode 100644 (file)
index 0000000..99b9d66
--- /dev/null
@@ -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' <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
index 1d8c06d70e94c173839e7d44fd3352849b6c2f46..9e863a3dfc00078ad0b30399e4bbbda342be18a5 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 25c322332deb38885afde1505ef60032bd312ced..486236b50d2e601ebee2c15f1bf8dd73ada18f43 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-flush
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index b2698680e5cc1a0ba6570bcb8d2d12bf512de213..e7f93d9a936986b13eb90a0cbe91c0ce68ce3c1b 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-format
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 22b569b2de7a285bdce05944d2c31dc89eb05f99..c4b606b340ebfcc540b5b3f9cdefcd86f09daf3d 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index e55e2b937001b7309fce90a33e7610aabac46184..e38900c7c1394aa9c32bff0f61f51a3ea45056f2 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index db51da4f4ea1d8398c0c386e6478965a0b750dfa..fe2004df4eff8d1638b75563051eb760035162eb 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index a974681fb637b4d08b381afed994ae84f9f355a5..0a315e325dde08558fa1cd11cc750fa2216f5585 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 528eded4710ab6beb8a31b490e5f699a914f94d1..4b9fdeb3bfc4ac3865c4953e52098a91f4b7f51c 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index b76cecdb0e1483920c43e9cec111e30a8b9c5055..3ba4ba3a168b01a1adfe891b9c02fcde7ac2fdb1 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 665e68017e7bf08c004b7bffcfd16aed7bf7860a..588ab7f24b77e0006954c746bd288ec1fde73816 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-help
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 1b4ff52e374d7a72cec98b459618c79cb55190df..00a74a678293f7998a81196a8134bfcb7d01a9fa 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 05/11/2015
-.\"    Manual: \ \&
-.\"    Source: \ \&
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\"      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
 .\" -----------------------------------------------------------------
index f9b6a4fb85629062e862b999e16b37bdffd1caef..f857a59268c2f0fb3e1f9473fba9e5eb6d96c81e 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 05/11/2015
-.\"    Manual: \ \&
-.\"    Source: \ \&
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\"      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
 .\" -----------------------------------------------------------------
index 29a696e55e49faf434973c5b04f8f4bd6ce65bf7..e53283a26c26c33510e9bd650edd7cdf5c8d30d8 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 820d72b62607ffdfb5cb128ec87f427299300e09..811eefda372dcaa8c4c9fb9b172a721fa70f76dd 100644 (file)
@@ -3,11 +3,11 @@
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
 .\"      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
 .\" -----------------------------------------------------------------
index 0287632a8b7e8dd0f60ef9dd55538ca5d4d834fb..a4138900bf7bed9a54257f10e1deb05394290472 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 2ecdcbfe308b59bf736484c6365b1e16688fe1f3..6a36563cd1b00c67febb47a5e324a6e3567b1cf7 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-list
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index da0b8797cb8763f4a4922802ddd8526bcba701c2..b7cd175f24a89eecde4d46b72b5eb7d14fb34562 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-compare
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index eba9eeace6a5c2ea8f251ee60dbf51e10ced1dd2..d1f8804dc6d285faf2c1cf316266b4c4142eb1f5 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 708eb620412e6a020998233fa0e979828871b106..aa3bf43c283eff4eed4774314b971138828a449e 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 1341eb849a93c41cf1e9a31c2f7d82369708f0af..d37281279e1c40979f50b92ea91172795472fc51 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 9e879a9e9e9f6aad4aec85b2108760ed2f01cbbe..227d5b86cf7fd52459afd9c57c56cd645e4ac18b 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index e2a6f5c68c47b7251429ed4a0f73e3c3b06b1c3f..ede4d6b243f728e4d70efc584d99adcabdf3ae0e 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 74098d25f39d3a0d2c1fafccbbf3f191a2d87d3a..4081b16a41747a5467976599b6bea76a9f93e3d9 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 94b5f70fe435f82d56449c8a27d435dbf620d684..a6b24d302e025d26791841b626fbae8bb8f262a2 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 0910848c9054a688c02b42fcb84fd49dd03c99f9..076c14659a44adf68ee273a9591b37435aeb32f6 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 72a78fd29791cb852fe90a7024c73093f85fbd2c..c18aa434bcdc99eaad8aa99acc7802aa5655d748 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index 5740f82c79b9833e3942f8e09c20f0b0bf48ac31..0614bfa6e3b213f6bee29889f48b9e827c0eb399 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-compare
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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
 .\" -----------------------------------------------------------------
index ebaa03e5c13c8ae1b7941bcfc6b84627fd03837a..e8193c6dbe879503fd64ec315e0247a5f527a7e5 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme
 .\"    Author: [see the "Authors" section]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      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
index e5423cf277285a95c8f105ffa429a220fa0998e1..997c69c73d71b7005fe66ef43961e42e20afaef2 100644 (file)
@@ -927,6 +927,14 @@ available, run "nvme help".</p></div>
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
+<a href="nvme-list-ctrl.html">nvme-list-ctrl(1)</a>\r
+</dt>\r
+<dd>\r
+<p>\r
+        List controller in NVMe subsystem\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
 <a href="nvme-read.html">nvme-read(1)</a>\r
 </dt>\r
 <dd>\r
diff --git a/nvme.c b/nvme.c
index 2c6e62bc6bfd879b06b37db524207adb44ed4d22..0accfcdac90e9086743f12b153be180301ff8e85 100644 (file)
--- 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];