Print this page
7938 disable LBA weighting on files and SSDs
Reviewed by: Yuri Pankov <yuripv@gmx.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>

@@ -1107,10 +1107,11 @@
         vdev_t *vd = arg;
 
         vd->vdev_open_thread = curthread;
         vd->vdev_open_error = vdev_open(vd);
         vd->vdev_open_thread = NULL;
+        vd->vdev_parent->vdev_nonrot &= vd->vdev_nonrot;
 }
 
 boolean_t
 vdev_uses_zvols(vdev_t *vd)
 {

@@ -1127,19 +1128,23 @@
 vdev_open_children(vdev_t *vd)
 {
         taskq_t *tq;
         int children = vd->vdev_children;
 
+        vd->vdev_nonrot = B_TRUE;
+
         /*
          * in order to handle pools on top of zvols, do the opens
          * in a single thread so that the same thread holds the
          * spa_namespace_lock
          */
         if (vdev_uses_zvols(vd)) {
-                for (int c = 0; c < children; c++)
+                for (int c = 0; c < children; c++) {
                         vd->vdev_child[c]->vdev_open_error =
                             vdev_open(vd->vdev_child[c]);
+                        vd->vdev_nonrot &= vd->vdev_child[c]->vdev_nonrot;
+                }
                 return;
         }
         tq = taskq_create("vdev_open", children, minclsyspri,
             children, children, TASKQ_PREPOPULATE);
 

@@ -1146,10 +1151,13 @@
         for (int c = 0; c < children; c++)
                 VERIFY(taskq_dispatch(tq, vdev_open_child, vd->vdev_child[c],
                     TQ_SLEEP) != NULL);
 
         taskq_destroy(tq);
+
+        for (int c = 0; c < children; c++)
+                vd->vdev_nonrot &= vd->vdev_child[c]->vdev_nonrot;
 }
 
 /*
  * Prepare a virtual device for access.
  */