diff options
author | Gvozden Neskovic <[email protected]> | 2016-12-03 00:59:35 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-12-02 16:59:35 -0700 |
commit | e8a2014436147d07442e52f854e197082748fca6 (patch) | |
tree | 45eabe29ed4c7848ffe15f81e09d1e948096828b /include/sys | |
parent | baf67d15a59025fb53fc60bf439ef291397366e8 (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/sys')
-rw-r--r-- | include/sys/spa_impl.h | 1 |
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 */ |