Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110760167
D14138.id39090.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
803 B
Referenced Files
None
Subscribers
None
D14138.id39090.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 6:28 PM (9 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16803555
Default Alt Text
D14138.id39090.diff (803 B)
Attached To
Mode
D14138: Fix "zpool add" crash when a replacing vdev has a spare child
Attached
Detach File
Event Timeline
Log In to Comment