From 8e9b53b3fd10e43842e2ef8c9e09ea2e3c6732a2 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sun, 13 Dec 2020 13:46:29 -0500 Subject: [PATCH] stats: remove nonsense dedup_unique_bytes stat A long time ago, when bees used dedicated threads to scan each subvol, the calculation of the "dedup_unique_bytes" statistic was still wrong. This stat can only be calculated when dedupe runs on extent data items instead of extent reference items. Remove the stat variable until that happens. Signed-off-by: Zygo Blaxell --- docs/event-counters.md | 1 - src/bees-context.cc | 5 ----- 2 files changed, 6 deletions(-) diff --git a/docs/event-counters.md b/docs/event-counters.md index 7969f67..24f7708 100644 --- a/docs/event-counters.md +++ b/docs/event-counters.md @@ -151,7 +151,6 @@ The `dedup` event group consists of operations that deduplicate data. * `dedup_prealloc_hit`: Total number of successfully eliminated `PREALLOC` extent references. * `dedup_prealloc_hit`: Total number of unsuccessfully eliminated `PREALLOC` extent references (i.e. filesystem data changed between scan and dedupe). * `dedup_try`: Total number of pairs of extent references submitted for deduplication. - * `dedup_unique_bytes`: Total bytes in extent data items deduplicated. The implementation of this counter is wrong. * `dedup_workaround_btrfs_send`: Total number of extent reference pairs submitted for deduplication that were discarded to workaround `btrfs send` bugs. exception diff --git a/src/bees-context.cc b/src/bees-context.cc index 540d898..7c7f7c5 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -258,11 +258,6 @@ BeesContext::dedup(const BeesRangePair &brp) if (rv) { BEESCOUNT(dedup_hit); BEESCOUNTADD(dedup_bytes, brp.first.size()); - thread_local BeesFileRange last_src_bfr; - if (!last_src_bfr.overlaps(brp.first)) { - BEESCOUNTADD(dedup_unique_bytes, brp.first.size()); - last_src_bfr = brp.first; - } } else { BEESCOUNT(dedup_miss); BEESLOGWARN("NO Dedup! " << brp);