Open croissanne opened 3 years ago
:rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit: :rabbit:
This code needs a bit of a rethink anyway: I'm not 100% sure if copy_file_range()
will result in the use of reflinks on btrfs. Also: the fallocate()
that we do here might actually break the reflinking.
That being said, there is a tradeoff here probably, between performance (reflinks) and lower fragmentation (fallocate and copy).
Maybe we should construct the destination file at the same time as the blocks...