summaryrefslogtreecommitdiffstats
path: root/include/sys/vdev.h
diff options
context:
space:
mode:
authorjwpoduska <[email protected]>2019-11-27 13:15:01 -0500
committerBrian Behlendorf <[email protected]>2019-11-27 10:15:01 -0800
commit3c819a2c7da4560abb75b9dbf9a314ceafddaf86 (patch)
tree665a9607adfe647d0336e7b9499c97da2d2d1dbf /include/sys/vdev.h
parent894f6696b4cf7cc2562da159ba5e6e8c806f35de (diff)
Prevent unnecessary resilver restarts
If a device is participating in an active resilver, then it will have a non-empty DTL. Operations like vdev_{open,reopen,probe}() can cause the resilver to be restarted (or deferred to be restarted later), which is unnecessary if the DTL is still covered by the current scan range. This is similar to the logic in vdev_dtl_should_excise() where the DTL can only be excised if it's max txg is in the resilvered range. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Gallagher <[email protected]> Reviewed-by: Kjeld Schouten <[email protected]> Signed-off-by: John Poduska <[email protected]> Issue #840 Closes #9155 Closes #9378 Closes #9551 Closes #9588
Diffstat (limited to 'include/sys/vdev.h')
-rw-r--r--include/sys/vdev.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sys/vdev.h b/include/sys/vdev.h
index c2fbcc549..56a869fec 100644
--- a/include/sys/vdev.h
+++ b/include/sys/vdev.h
@@ -23,6 +23,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017 by Delphix. All rights reserved.
* Copyright (c) 2017, Intel Corporation.
+ * Copyright (c) 2019, Datto Inc. All rights reserved.
*/
#ifndef _SYS_VDEV_H
@@ -152,7 +153,8 @@ extern int vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg);
extern void vdev_state_dirty(vdev_t *vd);
extern void vdev_state_clean(vdev_t *vd);
-extern void vdev_set_deferred_resilver(spa_t *spa, vdev_t *vd);
+extern void vdev_defer_resilver(vdev_t *vd);
+extern boolean_t vdev_clear_resilver_deferred(vdev_t *vd, dmu_tx_t *tx);
typedef enum vdev_config_flag {
VDEV_CONFIG_SPARE = 1 << 0,