summaryrefslogtreecommitdiff
path: root/module/zfs/vdev.c
diff options
context:
space:
mode:
authorGeorge Wilson <gwilson@zfsmail.com>2012-04-08 17:23:08 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2012-04-11 18:32:06 +0000
commit5ffb9d1d05d7c512b987dff51f587466d537770f (patch)
tree9ac15361477cfe4f3e34d1bfb1c27e978dbb3530 /module/zfs/vdev.c
parentb129c6590e07edcc95f3b64ec210d94cf885c192 (diff)
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r--module/zfs/vdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index 9f044b68c1d8..1630d2fae69d 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -492,7 +492,7 @@ vdev_alloc(spa_t *spa, vdev_t **vdp, nvlist_t *nv, vdev_t *parent, uint_t id,
&vd->vdev_removing);
}
- if (parent && !parent->vdev_parent) {
+ if (parent && !parent->vdev_parent && alloctype != VDEV_ALLOC_ATTACH) {
ASSERT(alloctype == VDEV_ALLOC_LOAD ||
alloctype == VDEV_ALLOC_ADD ||
alloctype == VDEV_ALLOC_SPLIT ||
@@ -669,6 +669,8 @@ vdev_top_transfer(vdev_t *svd, vdev_t *tvd)
svd->vdev_ms_shift = 0;
svd->vdev_ms_count = 0;
+ if (tvd->vdev_mg)
+ ASSERT3P(tvd->vdev_mg, ==, svd->vdev_mg);
tvd->vdev_mg = svd->vdev_mg;
tvd->vdev_ms = svd->vdev_ms;