Reflink when building store
When building a store from a directory tree in uncompressed mode, it would be great if desync could also use reflink, as that would reduce the size of the store on disk dramatically.
Use case is: updating filesystems using images and re-using the chunks of the files which are already there.
- echo '{"store-options": {"/mnt/usb/tmp/btrfs.img.castr": {"uncompressed": true}}}' > ~/.config/desync/config.json
- desync tar -i -s /mnt/usb/tmp/btrfs.img.castr /mnt/usb/tmp/btrfs.img.caidx /mnt/usb/
- desync untar -i -s /mnt/usb/tmp/btrfs.img.castr -s ssh://192.168.1.1/path/to/casync.store/ ./update.caidx /mnt/usb/
Do you mean reflinking of parts of chunks within the chunk store?
Chunk-stores dedup already de-dup whole chunks by their hash basically. There's currently no other/smaller hash that is performed on parts of chunks that could be used for reflinks. Also, given the way chunks are created based on split points in the content, I suspect it's very unlikely to align to block boundaries (typically 4k) which is necessary for reflinks. The only parts of chunks that could be reflinked would be blank/0-byte sections within chunks but the tool would still need to know where and how large those are.