It would be nice if cp defaults to reflink=auto, to go along with F33 feature: https://fedoraproject.org/wiki/Changes/BtrfsByDefault Current master uses reflink=auto https://github.com/coreutils/coreutils/blob/master/src/cp.c#L796 Recent discussion https://lists.gnu.org/archive/html/bug-coreutils/2020-06/msg00031.html The patch https://lists.gnu.org/archive/html/bug-coreutils/2020-06/msg00032.html The commit: "cp: default to COW" http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=25725f9d41735d176d73a757430739fb71c7d043 Additional info: On 6/25, four more commits show up for copy.c - I'm not certain if they should be applied as well. http://git.savannah.gnu.org/cgit/coreutils.git/log/
Thanks for the report! I will pick the upstream commit that changes the default. The other commits do not seem to be needed for this to work at first glance.
That single commit should suffice, and does seem appropriate given the change to BTRFS as the default
Yep, definitely not required, but nice to have. I'm not sure when coreutils 8.33 is planned, but looks like this change will be included in that version when it happens.
dist-git commit: https://src.fedoraproject.org/rpms/coreutils/c/5d08d14b
$ journalctl -b > journal.log $ cp journal.log journal2.log $ filefrag -v *log Filesystem type is: 9123683e File size of journal2.log is 838227 (205 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 31: 3792612.. 3792643: 32: encoded,shared 1: 32.. 63: 3792616.. 3792647: 32: 3792644: encoded,shared 2: 64.. 95: 3793106.. 3793137: 32: 3792648: encoded,shared 3: 96.. 127: 3793110.. 3793141: 32: 3793138: encoded,shared 4: 128.. 159: 3577558.. 3577589: 32: 3793142: encoded,shared 5: 160.. 191: 3793114.. 3793145: 32: 3577590: encoded,shared 6: 192.. 204: 3793117.. 3793129: 13: 3793146: last,encoded,shared,eof journal2.log: 7 extents found File size of journal.log is 838227 (205 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 31: 3792612.. 3792643: 32: encoded,shared 1: 32.. 63: 3792616.. 3792647: 32: 3792644: encoded,shared 2: 64.. 95: 3793106.. 3793137: 32: 3792648: encoded,shared 3: 96.. 127: 3793110.. 3793141: 32: 3793138: encoded,shared 4: 128.. 159: 3577558.. 3577589: 32: 3793142: encoded,shared 5: 160.. 191: 3793114.. 3793145: 32: 3577590: encoded,shared 6: 192.. 204: 3793117.. 3793129: 13: 3793146: last,encoded,shared,eof journal.log: 7 extents found $ Looks good to me.
Perfect. Thank you for verifying it!