Commit b926f2ad authored by Linus Torvalds's avatar Linus Torvalds

Revert "vf/remap: return the amount of bytes actually deduplicated"

This reverts commit 4a57a840.

Dave Chinner reports:
 "As I suspected would occur, this change causes test failures. e.g
  generic/517 in fstests fails with:

  generic/517 1s ... - output mismatch [..]
  -deduped 131172/131172 bytes at offset 65536
  +deduped 131072/131172 bytes at offset 65536"

  can you please revert this commit for the 5.19 series to give us more
  time to investigate and consider the impact of the the API change on
  userspace applications before we commit to changing the API"

That changed return value seems to reflect reality, but with the fstest
change, let's revert for now.
Requested-by: default avatarDave Chinner <david@fromorbit.com>
Link: https://lore.kernel.org/all/20220714223238.GH3600936@dread.disaster.area/
Cc: Ansgar Lößer <ansgar.loesser@tu-darmstadt.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent db886979
...@@ -547,7 +547,7 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same) ...@@ -547,7 +547,7 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same)
else if (deduped < 0) else if (deduped < 0)
info->status = deduped; info->status = deduped;
else else
info->bytes_deduped = deduped; info->bytes_deduped = len;
next_fdput: next_fdput:
fdput(dst_fd); fdput(dst_fd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment