]> git.hungrycats.org Git - bees/commitdiff
extent scan: don't serialize dedupe and LOGICAL_INO when using extent scan mode
authorZygo Blaxell <bees@furryterror.org>
Sat, 23 Nov 2024 04:26:37 +0000 (23:26 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sun, 1 Dec 2024 05:17:52 +0000 (00:17 -0500)
The serialization doesn't seem to be necessary for the extent scan mode.
No infinite loops in the kernel have been observed in the past two years,
despite never having used MultiLock for the extent scanner.

Leave the serialization for now on the subvol scanners.

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

index 33e945a007e33c5b8cb560713d571e0629bd1a97..1029cd4b710d6d3ef680f4058a4d2114122e6645 100644 (file)
@@ -797,6 +797,13 @@ bees_main(int argc, char *argv[])
        // Set root scan mode
        bc->roots()->set_scan_mode(root_scan_mode);
 
+       if (root_scan_mode == BeesRoots::SCAN_MODE_EXTENT) {
+               MultiLocker::enable_locking(false);
+       } else {
+               // Workaround for a kernel bug that the subvol-based crawlers keep triggering
+               MultiLocker::enable_locking(true);
+       }
+
        // Start crawlers
        bc->start();