]> git.hungrycats.org Git - bees/commitdiff
main: unconditionally enable workaround for the logical_ino-vs-clone kernel bug
authorZygo Blaxell <bees@furryterror.org>
Thu, 6 Feb 2025 06:17:09 +0000 (01:17 -0500)
committerZygo Blaxell <bees@furryterror.org>
Fri, 7 Feb 2025 04:14:16 +0000 (23:14 -0500)
This obviously doesn't fix or prevent the kernel bug, but it does prevent
bees from triggering the bug without assitance from another application.

The bug can still be triggered by running bees at the same time as an
application which uses clone or LOGICAL_INO.  `btdu` uses LOGICAL_INO,
while `cp` from coreutils (and many others) use clone (reflink copy).

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

index 7d51651eb114603265b6f41ec5596e1e2e4cd522..20c6db720158973aa0b896301b3b81f40291ec01 100644 (file)
@@ -875,12 +875,8 @@ 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);
-       }
+       // Workaround for the logical-ino-vs-clone kernel bug
+       MultiLocker::enable_locking(true);
 
        // Start crawlers
        bc->start();