]> git.hungrycats.org Git - bees/commitdiff
Revert "context: add experimental code for avoiding tiny extents"
authorZygo Blaxell <bees@furryterror.org>
Mon, 25 Nov 2024 01:16:46 +0000 (20:16 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sun, 1 Dec 2024 04:30:33 +0000 (23:30 -0500)
because this problem is better solved elsewhere.

This reverts commit 11fabd66a84b6631fb39bb6b2c066c689351fc26.

docs/event-counters.md
src/bees-context.cc

index 3821455e34555a1364914182809c868dc685e67c..c78c11d675920e9e452454d11643f2a46643be92 100644 (file)
@@ -336,7 +336,6 @@ The `scan` event group consists of operations related to scanning incoming data.
  * `scan_eof`: Scan past EOF was attempted.
  * `scan_erase_redundant`: Blocks in the hash table were removed because they were removed from the filesystem by dedupe.
  * `scan_extent`: An extent was scanned (`scan_one_extent`).
- * `scan_extent_tiny`: An extent below 128K that was not the beginning or end of a file was scanned.  No action is currently taken for these--they are merely counted.
  * `scan_forward`: A logical byte range was scanned (`scan_forward`).
  * `scan_found`: An entry was found in the hash table matching a scanned block from the filesystem.
  * `scan_hash_hit`: A block was found on the filesystem corresponding to a block found in the hash table.
index 09ec15219d2c6aeeb3929c3fdcbdfab4e2dd3c90..25d9084a5d3c9373881876935a5f61a4fa19e1f0 100644 (file)
@@ -300,15 +300,6 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
        BEESTRACE("scan extent " << e);
        BEESCOUNT(scan_extent);
 
-       // EXPERIMENT:  Don't bother with tiny extents unless they are the entire file.
-       // We'll take a tiny extent at BOF or EOF but not in between.
-       if (e.begin() && e.size() < 128 * 1024 && e.end() != Stat(bfr.fd()).st_size) {
-               BEESCOUNT(scan_extent_tiny);
-               // This doesn't work properly with the current architecture,
-               // so we don't do an early return here.
-               // return bfr;
-       }
-
        // We keep moving this method around
        auto m_ctx = shared_from_this();