Dedupe tools advance their file offsets by bytes_deduped, but when the
kernel shortens a request to a block boundary it still reports the
requested length. Patch 2 adds a flag under which bytes_deduped is what
the filesystem actually deduplicated. Patch 1 fixes the DAX comparator,
whose return value would otherwise surface through the flag.
Amir, thanks for the review; both points are taken in v5.
Changes since v4
(https://lore.kernel.org/linux-fsdevel/cover.1789653814.git.matthias.goergens@gmail.com/):
- flags is a plain rename of reserved2, without the union (Amir).
- Dropped the paragraph about old callers and old kernels (Amir).
- Documented the flag's effect on bytes_deduped in the UAPI header.
- Patch 1 unchanged.
The fstests test follows as generic/806 v3 in reply to its v2 on the
fstests list.
Matthias Goergens (2):
dax: return the comparison error from dax_dedupe_file_range_compare()
vfs: add FILE_DEDUPE_RANGE_REPORT_PROGRESS flag to FIDEDUPERANGE
fs/dax.c | 2 +-
fs/remap_range.c | 4 +++-
include/uapi/linux/fs.h | 11 ++++++++++-
3 files changed, 14 insertions(+), 3 deletions(-)
--
2.55.0