]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/spa_config.c
Fix typo/etc in module/zfs/zfs_ctldir.c
[mirror_zfs.git] / module / zfs / spa_config.c
index 50bba234540a9e45c9688b3cb6578f96e3a8b258..8616abda37bdfd34f2e6cd6f090d123efc3ec0a3 100644 (file)
@@ -22,7 +22,7 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
  * Copyright 2017 Joyent, Inc.
  */
 
@@ -576,6 +576,18 @@ spa_config_update(spa_t *spa, int what)
                 */
                for (c = 0; c < rvd->vdev_children; c++) {
                        vdev_t *tvd = rvd->vdev_child[c];
+
+                       /*
+                        * Explicitly skip vdevs that are indirect or
+                        * log vdevs that are being removed. The reason
+                        * is that both of those can have vdev_ms_array
+                        * set to 0 and we wouldn't want to change their
+                        * metaslab size nor call vdev_expand() on them.
+                        */
+                       if (!vdev_is_concrete(tvd) ||
+                           (tvd->vdev_islog && tvd->vdev_removing))
+                               continue;
+
                        if (tvd->vdev_ms_array == 0)
                                vdev_metaslab_set_size(tvd);
                        vdev_expand(tvd, txg);
@@ -600,7 +612,7 @@ spa_config_update(spa_t *spa, int what)
                spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(spa_config_load);
 EXPORT_SYMBOL(spa_all_configs);
 EXPORT_SYMBOL(spa_config_set);