]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
treewide: disable warning about NoCOW on btrfs
authorEric Wong <e@80x24.org>
Sat, 20 Sep 2025 00:04:50 +0000 (00:04 +0000)
committerEric Wong <e@80x24.org>
Mon, 22 Sep 2025 20:49:59 +0000 (20:49 +0000)
It's too noisy for tests and breaks some tests which check for
warnings when TMPDIR is btrfs.  I didn't notice this earlier
since I had TMPDIR pointed at /dev/shm on my btrfs machine.
We'll probably just make CoW the default for btrfs because the
CoW overhead with --split-shards on initial index is "only" 100%
or so...

lib/PublicInbox/Syscall.pm

index e65c3301deee624a19d6137459d93fe05fb46d4c..3a46dd4901d11af84e9b59b2b1c53e5a0624d4de 100644 (file)
@@ -491,12 +491,7 @@ sub yesdatacow_fh ($) {
 sub nodatacow_dir ($) {
        my ($f) = @_;
        if (open my $fh, '<', $f) {
-               my $rc = nodatacow_fh($fh); # returns "0 but true" on success
-               $rc && $rc == 0 and warn <<EOM;
-W: Disabling copy-on-write (CoW) on `$f'
-W: to avoid pathological slowdowns.  Data corruption may occur on unclean
-W: shutdowns, especially if using any form of BTRFS RAID.
-EOM
+               return nodatacow_fh($fh); # returns "0 but true" on success
        }
 }