Update reflink.rs from FICLONERANGE to FIDEDUPERANGE for data safety
IOCTL offers three key functions:
FICLONE: This function duplicates entire files by sharing storage, without assessing content similarity.
FICLONERANGE: This function allows for the cloning of specific byte ranges between files, also without verifying content similarity.
FIDEDUPERANGE: This function conducts deduplication by comparing specified byte ranges, sharing storage only when the content is identical; differing ranges remain distinct.
Among these, FIDEDUPERANGE is the only option that verifies the content of blocks prior to deduplication, making it the sole method that guarantees 100% safety for this process.
Dedupe via IOCTL calls currently uses FICLONE. Which works but the issue is that its not 100% safe as FICLONE does not check file contents as it is for cloning not deduplication. So it clones blocks even if they are different.
Hence the PR to fix this and close #293
Original request from @patrickwolf
https://github.com/pkolaczk/fclones/issues/293#issue-2934844801
Suggestion on implementation from @zygo
https://github.com/pkolaczk/fclones/issues/293#issuecomment-2744089865
PS: For full transparency my background is Python/C# and not Rust so I let Sonnet 3.7 help me with the PR
合并状态:未合并 5 条评论