]> git.hungrycats.org Git - bees/commitdiff
progress: base progress estimates on queued extents, not completed ones
authorZygo Blaxell <bees@furryterror.org>
Thu, 19 Jun 2025 02:40:31 +0000 (22:40 -0400)
committerZygo Blaxell <bees@furryterror.org>
Tue, 22 Jul 2025 01:21:54 +0000 (21:21 -0400)
This means the progress table in the status output reflects the state of
the oldest task in the queue, not the newest.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-roots.cc

index 79e549aae30b17c9519ab958090eebf07ad082ae..39ade7079511ab4a5be0d763dd875667023e34b9 100644 (file)
@@ -1305,8 +1305,8 @@ BeesScanModeExtent::next_transid()
                const auto this_crawl = found->second->crawl();
                THROW_CHECK1(runtime_error, subvol, this_crawl);
 
-               // Get the last _completed_ state
-               const auto this_state = this_crawl->get_state_begin();
+               // Get the last _queued_ state
+               const auto this_state = this_crawl->get_state_end();
 
                auto bytenr = this_state.m_objectid;
                const auto bg_found = bg_info_map.lower_bound(bytenr);