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...
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
}
}