Changes to copy_file_range for 5.3 from Dave and Amir:
- Create a generic copy_file_range handler and make individual
  filesystems responsible for calling it (i.e. no more assuming that
  do_splice_direct will work or is appropriate)
- Refactor copy_file_range and remap_range parameter checking where they
  are the same
- Install missing copy_file_range parameter checking(!)
- Remove suid/sgid and update mtime like any other file write
- Change the behavior so that a copy range crossing the source file's
  eof will result in a short copy to the source file's eof instead of
  EINVAL
- Permit filesystems to decide if they want to handle cross-superblock
  copy_file_range in their local handlers.
fuse: copy_file_range needs to strip setuid bits and update timestamps

Like ->write_iter(), we update mtime and strip setuid of dst file before
copy and like ->read_iter(), we update atime of src file after copy.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 file changed