svn commit: r329778 - vendor/illumos/dist/cmd/zpool
Alexander Motin
mav at FreeBSD.org
Thu Feb 22 01:17:32 UTC 2018
Author: mav
Date: Thu Feb 22 01:17:32 2018
New Revision: 329778
URL: https://svnweb.freebsd.org/changeset/base/329778
Log:
8941 zpool add: assertion failed in get_replication() with nested interior VDEVs
illumos/illumos-gate at ac0215f4d618163d117a40fbf77a3f944852cb7b
When replacing a faulted device which was previously handled by a spare
multiple levels of nested interior VDEVs will be present in the pool
configuration: get_replication() needs to handle this situation gracefully
to let zpool add new devices to the pool
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Andrew Stormont <andyjstormont at gmail.com>
Approved by: Dan McDonald <danmcd at joyent.com>
Author: loli10K <ezomori.nozomu at gmail.com>
Modified:
vendor/illumos/dist/cmd/zpool/zpool_vdev.c
Modified: vendor/illumos/dist/cmd/zpool/zpool_vdev.c
==============================================================================
--- vendor/illumos/dist/cmd/zpool/zpool_vdev.c Thu Feb 22 01:00:46 2018 (r329777)
+++ vendor/illumos/dist/cmd/zpool/zpool_vdev.c Thu Feb 22 01:17:32 2018 (r329778)
@@ -628,9 +628,11 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
/*
* If this is a replacing or spare vdev, then
- * get the real first child of the vdev.
+ * get the real first child of the vdev: do this
+ * in a loop because replacing and spare vdevs
+ * can be nested.
*/
- if (strcmp(childtype,
+ while (strcmp(childtype,
VDEV_TYPE_REPLACING) == 0 ||
strcmp(childtype, VDEV_TYPE_SPARE) == 0) {
nvlist_t **rchild;
More information about the svn-src-vendor
mailing list