summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2014-09-18 14:50:50 +0000
committersmh <smh@FreeBSD.org>2014-09-18 14:50:50 +0000
commita0b52baaa82642f374e8621df92ebe76e43eea1e (patch)
tree6ced4d8bee22db1761b61a649d07a396eef6afa8 /sys/cddl
parent45208196a6060fb89eb199f8b00e5b9ab7e6bbb4 (diff)
downloadFreeBSD-src-a0b52baaa82642f374e8621df92ebe76e43eea1e.zip
FreeBSD-src-a0b52baaa82642f374e8621df92ebe76e43eea1e.tar.gz
MFC r271429:
Persist vdev_resilver_txg changes to avoid panic caused by validation vs a vdev_resilver_txg value from a previous resilver. Approved by: re (glebius) Sponsored by: Multiplay
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c7
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);
OpenPOWER on IntegriCloud