summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGvozden Neskovic <[email protected]>2016-12-03 00:59:35 +0100
committerBrian Behlendorf <[email protected]>2016-12-02 16:59:35 -0700
commite8a2014436147d07442e52f854e197082748fca6 (patch)
tree45eabe29ed4c7848ffe15f81e09d1e948096828b /include
parentbaf67d15a59025fb53fc60bf439ef291397366e8 (diff)
Cache ddt_get_dedup_dspace() value if there was no ddt changes
Save and reuse ddt dspace calculation when there have been no ddt changes. This avoids unnecessary traversal of 168KiB of ddt histograms. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Gvozden Neskovic <[email protected]> Closes #5425
Diffstat (limited to 'include')
-rw-r--r--include/sys/spa_impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h
index 88bde98dc..a1bf14eac 100644
--- a/include/sys/spa_impl.h
+++ b/include/sys/spa_impl.h
@@ -239,6 +239,7 @@ struct spa {
uint64_t spa_autoexpand; /* lun expansion on/off */
ddt_t *spa_ddt[ZIO_CHECKSUM_FUNCTIONS]; /* in-core DDTs */
uint64_t spa_ddt_stat_object; /* DDT statistics */
+ uint64_t spa_dedup_dspace; /* Cache get_dedup_dspace() */
uint64_t spa_dedup_ditto; /* dedup ditto threshold */
uint64_t spa_dedup_checksum; /* default dedup checksum */
uint64_t spa_dspace; /* dspace in normal class */