summaryrefslogtreecommitdiffstats
path: root/include/sys/spa_impl.h
diff options
context:
space:
mode:
authorSara Hartse <[email protected]>2019-07-26 10:54:14 -0700
committerBrian Behlendorf <[email protected]>2019-07-26 10:54:14 -0700
commit37f03da8ba6e1ab074b503e1dd63bfa7199d0537 (patch)
tree987b03643c33cd43b246a20aea28b8750f7b4ee6 /include/sys/spa_impl.h
parentd274ac54609894d00a49c0a0da89abd3a7f3998d (diff)
Fast Clone Deletion
Deleting a clone requires finding blocks are clone-only, not shared with the snapshot. This was done by traversing the entire block tree which results in a large performance penalty for sparsely written clones. This is new method keeps track of clone blocks when they are modified in a "Livelist" so that, when it’s time to delete, the clone-specific blocks are already at hand. We see performance improvements because now deletion work is proportional to the number of clone-modified blocks, not the size of the original dataset. Reviewed-by: Sean Eric Fagan <[email protected]> Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Signed-off-by: Sara Hartse <[email protected]> Closes #8416
Diffstat (limited to 'include/sys/spa_impl.h')
-rw-r--r--include/sys/spa_impl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h
index 929144017..ebe14dae4 100644
--- a/include/sys/spa_impl.h
+++ b/include/sys/spa_impl.h
@@ -49,6 +49,7 @@
#include <sys/dsl_crypt.h>
#include <sys/zfeature.h>
#include <sys/zthr.h>
+#include <sys/dsl_deadlist.h>
#include <zfeature_common.h>
#ifdef __cplusplus
@@ -317,6 +318,11 @@ struct spa {
list_t spa_log_summary;
uint64_t spa_log_flushall_txg;
+ zthr_t *spa_livelist_delete_zthr; /* deleting livelists */
+ zthr_t *spa_livelist_condense_zthr; /* condensing livelists */
+ uint64_t spa_livelists_to_delete; /* set of livelists to free */
+ livelist_condense_entry_t spa_to_condense; /* next to condense */
+
char *spa_root; /* alternate root directory */
uint64_t spa_ena; /* spa-wide ereport ENA */
int spa_last_open_failed; /* error if last open failed */