]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: enable remap callers that can handle short operations
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Oct 2018 23:42:10 +0000 (10:42 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 29 Oct 2018 23:42:10 +0000 (10:42 +1100)
commit20d4d1637b305fe09968bbc60002df0a3009ad9c
tree00e5f8bd5de34435872d8cb222daaec79ede3961
parentd90e26055f3228966b1d70ad288ba5664b7030b1
vfs: enable remap callers that can handle short operations

Plumb in a remap flag that enables the filesystem remap handler to
shorten remapping requests for callers that can handle it.  Now
copy_file_range can report partial success (in case we run up against
alignment problems, resource limits, etc.).

We also enable CAN_SHORTEN for fideduperange to maintain existing
userspace-visible behavior where xfs/btrfs shorten the dedupe range to
avoid stale post-eof data exposure.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Documentation/filesystems/vfs.txt
fs/read_write.c
include/linux/fs.h
mm/filemap.c