X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fvdev.c;h=1630d2fae69dd490c86380d835e2f05260d3522a;hb=b6ad9671acdd245385744bcc1fe6c0f21f252570;hp=9f044b68c1d8fd656d15b42f4df9fd935029b918;hpb=57a4eddc4d5e1e6c10d8d7dcf87a9fc27398adcd;p=zfs.git diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 9f044b6..1630d2f 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;