@ahrens Like this?
```
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index 5185355..bfe7020 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -2921,6 +2921,12 @@ vdev_clear(spa_t *spa, vdev_t *vd)
                vdev_clear(spa, vd->vdev_child[c]);
 
        /*
+        * It makes no sense to "clear" an indirect vdev.
+        */
+       if (!vdev_is_concrete(vd))
+               return;
+
+       /*
         * If we're in the FAULTED state or have experienced failed I/O, then
         * clear the persistent state and attempt to reopen the device.  We
         * also mark the vdev config dirty, so that the new faulted state is
```
Also, it looks like we need something similar in ```vdev_free()``` to avoid 
panicking on ```ASSERT(vd->vdev_child == NULL);```.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/482#issuecomment-347576750
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Teafc5ffabd7f916f-M2dafeac58a4b0327ac4a90d1
Powered by Topicbox: https://topicbox.com

Reply via email to