diff options
author | Tom Caputi <tcaputi@datto.com> | 2018-11-07 18:44:14 -0500 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2018-11-07 15:44:14 -0800 |
commit | fde25c0a87ea7e2d4438485cd55646a91b99c4b4 (patch) | |
tree | db6bed0578058ad2b872c6b702e7828d74ebff14 /module | |
parent | f44ad9297da6e638482232636e9d63302b96f7e9 (diff) |
Fix dirtying vdev config on with RO spa
This patch simply corrects an issue where vdev_dtl_reassess()
could attempt to dirty the vdev config even when the spa was
not elligable for writing.
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8085
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/vdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 2f28a01c6..78e701c80 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -2520,7 +2520,8 @@ vdev_dtl_should_excise(vdev_t *vd) } /* - * Reassess DTLs after a config change or scrub completion. + * Reassess DTLs after a config change or scrub completion. If txg == 0 no + * write operations will be issued to the pool. */ void vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, int scrub_done) @@ -2603,7 +2604,7 @@ vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, int scrub_done) * DTLs then reset its resilvering flag and dirty * the top level so that we persist the change. */ - if (vd->vdev_resilver_txg != 0 && + if (txg != 0 && vd->vdev_resilver_txg != 0 && range_tree_is_empty(vd->vdev_dtl[DTL_MISSING]) && range_tree_is_empty(vd->vdev_dtl[DTL_OUTAGE])) { vd->vdev_resilver_txg = 0; |