diff options
author | smh <smh@FreeBSD.org> | 2014-09-11 16:21:51 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2014-09-11 16:21:51 +0000 |
commit | c3c60bff50b0742fb9c0f4e07ace86ea772ef637 (patch) | |
tree | d09b6db4425ffc7c93c4058c885df02dacc6012c | |
parent | e12a77b0cbb6b4c18eaeeedf28d9b22db5e5f23e (diff) | |
download | FreeBSD-src-c3c60bff50b0742fb9c0f4e07ace86ea772ef637.zip FreeBSD-src-c3c60bff50b0742fb9c0f4e07ace86ea772ef637.tar.gz |
Persist vdev_resilver_txg changes to avoid panic caused by validation
vs a vdev_resilver_txg value from a previous resilver.
MFC after: 1 week
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c index 0c599b1..7eac42c 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c @@ -1951,12 +1951,15 @@ vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, int scrub_done) /* * If the vdev was resilvering and no longer has any - * DTLs then reset its resilvering flag. + * DTLs then reset its resilvering flag and dirty + * the top level so that we persist the change. */ if (vd->vdev_resilver_txg != 0 && range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0 && - range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0) + range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0) { vd->vdev_resilver_txg = 0; + vdev_config_dirty(vd->vdev_top); + } mutex_exit(&vd->vdev_dtl_lock); |