[prev in list] [next in list] [prev in thread] [next in thread] 

List:       illumos-developer
Subject:    [developer] emulated NVMe controller on ESXi 6.7 fails to attach
From:       Yuri Pankov <yuripv () yuripv ! net>
Date:       2018-07-31 15:36:55
Message-ID: 32c11a47-4864-8d99-7951-1282d7b4e664 () yuripv ! net
[Download RAW message or body]

...because of the "thin provisioning" feature introduced in 6.7's NVMe 
emulation.  Looking at the standard, I don't see why we reject such 
namespaces as we aren't required to handle them in any specific way. 
The following obvious change below allows me to successfully use the 
nvme controller, without any visible issues.  Anything I'm missing here?

diff --git a/usr/src/uts/common/io/nvme/nvme.c 
b/usr/src/uts/common/io/nvme/nvme.c
index 8c45651b63..3d04374887 100644
--- a/usr/src/uts/common/io/nvme/nvme.c
+++ b/usr/src/uts/common/io/nvme/nvme.c
@@ -83,8 +83,8 @@
   * NVMe devices can have multiple namespaces, each being a independent 
data
   * store. The driver supports multiple namespaces and creates a blkdev 
interface
   * for each namespace found. Namespaces can have various attributes to 
support
- * thin provisioning and protection information. This driver does not 
support
- * any of this and ignores namespaces that have these attributes.
+ * protection information. This driver does not support any of this and 
ignores
+ * namespaces that have these attributes.
   *
   * As of NVMe 1.1 namespaces can have an 64bit Extended Unique Identifier
   * (EUI64). This driver uses the EUI64 if present to generate the 
devid and
@@ -2234,16 +2234,13 @@ nvme_init_ns(nvme_t *nvme, int nsid)

         /*
          * We currently don't support namespaces that use either:
-        * - thin provisioning
          * - protection information
          * - illegal block size (< 512)
          */
-       if (idns->id_nsfeat.f_thin ||
-           idns->id_dps.dp_pinfo) {
+       if (idns->id_dps.dp_pinfo) {
                 dev_err(nvme->n_dip, CE_WARN,
-                   "!ignoring namespace %d, unsupported features: "
-                   "thin = %d, pinfo = %d", nsid,
-                   idns->id_nsfeat.f_thin, idns->id_dps.dp_pinfo);
+                   "!ignoring namespace %d, unsupported feature: "
+                   "pinfo = %d", nsid, idns->id_dps.dp_pinfo);
                 ns->ns_ignore = B_TRUE;
         } else if (ns->ns_block_size < 512) {
                 dev_err(nvme->n_dip, CE_WARN,

------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T9c544a7b74c3f7ea-M0da7939a7faafcf88696a224
Delivery options: https://illumos.topicbox.com/groups/developer/subscription
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic