aboutsummaryrefslogtreecommitdiff
path: root/module/zfs/spa.c
diff options
context:
space:
mode:
authorGeorge Wilson <george.wilson@delphix.com>2013-08-07 20:16:22 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2013-11-05 20:23:05 +0000
commit5d1f7fb647e8923d154901ef3e19676e7bf3d345 (patch)
tree84dd945cc22d9bd28ae47796ed3718afe7bcd2ad /module/zfs/spa.c
parent621dd7bb2c970838bcf2226ac365c517af7a4bb1 (diff)
downloadsrc-5d1f7fb647e8923d154901ef3e19676e7bf3d345.tar.gz
src-5d1f7fb647e8923d154901ef3e19676e7bf3d345.zip
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r--module/zfs/spa.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 6b9b079df448..c7ea5953630d 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -4509,7 +4509,7 @@ spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot, int replacing)
}
/* mark the device being resilvered */
- newvd->vdev_resilvering = B_TRUE;
+ newvd->vdev_resilver_txg = txg;
/*
* If the parent is not a mirror, or if we're replacing, insert the new
@@ -5370,13 +5370,6 @@ spa_vdev_resilver_done_hunt(vdev_t *vd)
return (oldvd);
}
- if (vd->vdev_resilvering && vdev_dtl_empty(vd, DTL_MISSING) &&
- vdev_dtl_empty(vd, DTL_OUTAGE)) {
- ASSERT(vd->vdev_ops->vdev_op_leaf);
- vd->vdev_resilvering = B_FALSE;
- vdev_config_dirty(vd->vdev_top);
- }
-
/*
* Check for a completed replacement. We always consider the first
* vdev in the list to be the oldest vdev, and the last one to be
@@ -5466,6 +5459,8 @@ spa_vdev_resilver_done(spa_t *spa)
ASSERT(pvd->vdev_ops == &vdev_replacing_ops);
sguid = ppvd->vdev_child[1]->vdev_guid;
}
+ ASSERT(vd->vdev_resilver_txg == 0 || !vdev_dtl_required(vd));
+
spa_config_exit(spa, SCL_ALL, FTAG);
if (spa_vdev_detach(spa, guid, pguid, B_TRUE) != 0)
return;