On 28/01/2022 12:07, Matthias Urlichs wrote:
Package: coreutils
Version: 8.32-4+b1
Severity: wishlist
X-Debbugs-Cc: sm...@smurf.noris.de

Moving files between btrfs subvolumes doesn't work because they're
different volumes.

However, it's possible to reflink the files to their new location, then
remove the original.

Rather than forcing the user to do the cp+rm dance that -- in the distant
past -- was required to move files between different hard disks, please add
an option to /bin/mv to use (or try using) reflinks for moving files.

Using reflinks automatigally when a "normal" rename(2) fails may be a
sensible default, but should be turnoffable.

mv should already be doing this since v8.24
https://github.com/coreutils/coreutils/commit/b47231be6

Note we switched from BTRFS_IOC_CLONE to the more general FICLONE
in v8.26, though that should be supported by BTRFS:
https://github.com/coreutils/coreutils/commit/89e1fef97

Could you provide an strace of the failing reflink.

thanks,
Pádraig

Reply via email to