From d14fa5dba1ad0e68e803435ac48ec1ea78121699 Mon Sep 17 00:00:00 2001 From: smh Date: Fri, 24 Jun 2016 00:45:19 +1000 Subject: FreeBSD rS271776 - Persist vdev_resilver_txg changes Persist vdev_resilver_txg changes to avoid panic caused by validation vs a vdev_resilver_txg value from a previous resilver. Authored-by: smh Ported-by: Chris Dunlop Signed-off-by: Brian Behlendorf OpenZFS-issue: https://www.illumos.org/issues/5154 FreeBSD-issue: https://reviews.freebsd.org/rS271776 FreeBSD-commit: https://github.com/freebsd/freebsd/commit/c3c60bf Closes #4790 --- module/zfs/vdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/zfs/vdev.c') diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 607be3ce3..fb0a2c31f 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -1909,12 +1909,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); -- cgit v1.2.3