diff options
author | smh <[email protected]> | 2016-06-24 00:45:19 +1000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-06-24 13:02:42 -0700 |
commit | d14fa5dba1ad0e68e803435ac48ec1ea78121699 (patch) | |
tree | 73d3de4d7164eb9ceab95e32f36019b04db55876 /module/zfs/vdev.c | |
parent | 784d15c14c3ce033f863c36299292f40a4c41641 (diff) |
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 <[email protected]>
Ported-by: Chris Dunlop <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
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
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r-- | module/zfs/vdev.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |