Page MenuHomeFreeBSD

D14138.diff
No OneTemporary

D14138.diff

Index: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
===================================================================
--- head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
+++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
@@ -688,6 +688,21 @@
verify(nvlist_lookup_string(cnv,
ZPOOL_CONFIG_TYPE,
&childtype) == 0);
+ if (strcmp(childtype,
+ VDEV_TYPE_SPARE) == 0) {
+ /* We have a replacing vdev with
+ * a spare child. Get the first
+ * real child of the spare
+ */
+ verify(
+ nvlist_lookup_nvlist_array(
+ cnv,
+ ZPOOL_CONFIG_CHILDREN,
+ &rchild,
+ &rchildren) == 0);
+ assert(rchildren >= 2);
+ cnv = rchild[0];
+ }
}
verify(nvlist_lookup_string(cnv,

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 1, 2:37 PM (7 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37825438
Default Alt Text
D14138.diff (803 B)

Event Timeline