Closed boomshroom closed 1 month ago
Fixed in https://github.com/koverstreet/bcachefs/commit/8d67f575f51a8544942db258716d303f9731a4d4. While not adding native equality checking, it does remove the early return allowing for deduplication utilities to function.
This flag is set by the
FIDEDUPERANGE
ioctl call and denotes that the provided ranges are to be checked for equality before reflinking them. This ioctl call is used by several out-of-band deduplication utilities like duperemove and rmlint, though this functionality would become unnecessary if bcachefs added its own out-of-band or in-band deduplication.While it could potentially be faster to handle the checking within bcachefs itself,
generic_remap_file_range_prep
, which bcachefs already calls, has its own implementation of said equality checking, so it doesn't seem like additional work would be required. With this in mind, it's unclear to me why bcachefs seems to check for this flag to returnEOPNOTSUPP
.If in-band deduplication were ever added, then this flag could potentially trigger an early return since nothing would need to happen, though that would naturally be a longer term goal.