mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 03:45:02 +01:00
DDT: Skip DDT log lookups in ddt_prune_walk()
DDT log is not explicitly locked, and serialized only by the TXG sync process. Since that stage of ddt_prune_walk() is not in sync with the TXG sync process, we can't access the DDT log there. We could possibly lock it, but it seems we can just skip it, since it is only a performance optimization, while the final LOG lookup is be done by prune_candidates_sync() any way. Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Closes #18889
This commit is contained in:
1 parent
5d687a975c
commit
fd1ae59c76
1 file changed
-7
@@ -2860,13 +2860,6 @@ ddt_prune_walk(spa_t *spa, uint64_t cutoff, ddt_age_histo_t *histogram)
|
||||
uint64_t class_start =
|
||||
ddlwe.ddlwe_phys.ddp_flat.ddp_class_start;
|
||||
|
||||
/*
|
||||
* If this entry is on the log, then the stored entry is stale
|
||||
* and we should skip it.
|
||||
*/
|
||||
if (ddt_log_find_key(ddt, &ddlwe.ddlwe_key, NULL, NULL))
|
||||
continue;
|
||||
|
||||
/* prune older entries */
|
||||
if (pruning && class_start < cutoff) {
|
||||
if (candidates++ >= zfs_ddt_prunes_per_txg) {
|
||||
|
||||
Reference in new issue
Block a user