]> git.baikalelectronics.ru Git - kernel.git/commit
vf/remap: return the amount of bytes actually deduplicated
authorAnsgar Lößer <ansgar.loesser@tu-darmstadt.de>
Wed, 13 Jul 2022 18:51:44 +0000 (20:51 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Jul 2022 19:08:14 +0000 (12:08 -0700)
commitf7d43db6c74a5305d7d1712ddb74a914e4c99dd9
tree89ee061d5956064e266c4031cebe5f0b2370e14a
parent0d6ea563cc89266c79246b8055032f8a08e98b70
vf/remap: return the amount of bytes actually deduplicated

When using the FIDEDUPRANGE ioctl, in case of success the requested size
is returned. In some cases this might not be the actual amount of bytes
deduplicated.

This change modifies vfs_dedupe_file_range() to report the actual amount
of bytes deduplicated, instead of the requested amount.

Link: https://lore.kernel.org/linux-fsdevel/5548ef63-62f9-4f46-5793-03165ceccacc@tu-darmstadt.de/
Reported-by: Ansgar Lößer <ansgar.loesser@kom.tu-darmstadt.de>
Reported-by: Max Schlecht <max.schlecht@informatik.hu-berlin.de>
Reported-by: Björn Scheuermann <scheuermann@kom.tu-darmstadt.de>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Darrick J Wong <djwong@kernel.org>
Signed-off-by: Ansgar Lößer <ansgar.loesser@kom.tu-darmstadt.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/remap_range.c