mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: Gvozden Neskovic <neskovic@gmail.com> Closes #5425
This commit is contained in:
committed by
Brian Behlendorf
parent
baf67d15a5
commit
e8a2014436
@@ -635,6 +635,9 @@ spa_add(const char *name, nvlist_t *config, const char *altroot)
|
||||
spa->spa_min_ashift = INT_MAX;
|
||||
spa->spa_max_ashift = 0;
|
||||
|
||||
/* Reset cached value */
|
||||
spa->spa_dedup_dspace = ~0ULL;
|
||||
|
||||
/*
|
||||
* As a pool is being created, treat all features as disabled by
|
||||
* setting SPA_FEATURE_DISABLED for all entries in the feature
|
||||
|
||||
Reference in New Issue
Block a user