]> git.hungrycats.org Git - bees/commitdiff
crawl: rename next_transid() to avoid confusion with BeesScanMode::next_transid()
authorZygo Blaxell <bees@furryterror.org>
Sat, 30 Nov 2024 17:49:22 +0000 (12:49 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sun, 1 Dec 2024 04:30:33 +0000 (23:30 -0500)
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-roots.cc
src/bees.h

index 7cfcd2bd0873ad360bcd3ea48d0da24b8599bf37..10a7462b534c1e74835f259dd7239b0930d1a98e 100644 (file)
@@ -1320,7 +1320,7 @@ BeesCrawl::BeesCrawl(shared_ptr<BeesContext> ctx, BeesCrawlState initial_state)
 }
 
 bool
-BeesCrawl::next_transid()
+BeesCrawl::restart_crawl()
 {
        const auto roots = m_ctx->roots();
        const auto next_transid = roots->transid_max();
@@ -1365,7 +1365,7 @@ BeesCrawl::fetch_extents()
 
        // We can't scan an empty transid interval.
        if (m_finished || old_state.m_max_transid <= old_state.m_min_transid) {
-               return next_transid();
+               return restart_crawl();
        }
 
        // Check for btrfs send workaround: don't scan RO roots at all, pretend
@@ -1376,7 +1376,7 @@ BeesCrawl::fetch_extents()
        if (m_ctx->is_root_ro(old_state.m_root)) {
                BEESLOGDEBUG("WORKAROUND: skipping scan of RO root " << old_state.m_root);
                BEESCOUNT(root_workaround_btrfs_send);
-               // We would call next_transid() here, but we want to do a few things differently.
+               // We would call restart_crawl() here, but we want to do a few things differently.
                // We immediately defer further crawling on this subvol.
                // We track max_transid if the subvol scan has never started.
                // We postpone the started timestamp since we haven't started.
@@ -1418,7 +1418,7 @@ BeesCrawl::fetch_extents()
        if (!m_next_extent_data) {
                // Ran out of data in this subvol and transid.
                // Try to restart immediately if more transids are available.
-               return next_transid();
+               return restart_crawl();
        }
        auto new_state = old_state;
        new_state.m_objectid = max(m_next_extent_data.objectid() + 1, m_next_extent_data.objectid());
index 93cd4612a193a5275aeae51bf90a83529c72a674..116b747954c13a259adf375f29dfb7533fa9b18b 100644 (file)
@@ -515,7 +515,7 @@ class BeesCrawl {
 
        bool fetch_extents();
        void fetch_extents_harder();
-       bool next_transid();
+       bool restart_crawl();
        BeesFileRange bti_to_bfr(const BtrfsTreeItem &bti) const;
 
 public: