mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Reviewed-by: Amir Goldstein <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
This commit is contained in:
parent
df36583619
commit
eca3654e3c
4 changed files with 33 additions and 15 deletions
|
|
@ -970,7 +970,9 @@ otherwise noted.
|
|||
negative error code if errors occurred before any bytes were remapped.
|
||||
The remap_flags parameter accepts REMAP_FILE_* flags. If
|
||||
REMAP_FILE_DEDUP is set then the implementation must only remap if the
|
||||
requested file ranges have identical contents.
|
||||
requested file ranges have identical contents. If REMAP_CAN_SHORTEN is
|
||||
set, the caller is ok with the implementation shortening the request
|
||||
length to satisfy alignment or EOF requirements (or any other reason).
|
||||
|
||||
fadvise: possibly called by the fadvise64() system call.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue