summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-10-30 02:42:10 +0300
committerDave Chinner <david@fromorbit.com>2018-10-30 02:42:10 +0300
commiteca3654e3cc7d93e9734d0fa96cfb15c7f356244 (patch)
tree00e5f8bd5de34435872d8cb222daaec79ede3961 /Documentation
parentdf3658361951e17364f1e1c3fa92862a990ad8bd (diff)
downloadlinux-eca3654e3cc7d93e9734d0fa96cfb15c7f356244.tar.xz
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/vfs.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 1bd2919deaca..5f71a252e2e0 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -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.