Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e00273f authored by Eric Sandeen's avatar Eric Sandeen Committed by lixiang
Browse files

exfat: use iter_file_splice_write



Doing copy_file_range() on exfat with a file opened for direct IO leads
to an -EFAULT:

       -c "copy_range -d 16384 -l 16384 -f 0" /mnt/test/junk
copy_range: Bad address

and the reason seems to be that we go through:

default_file_splice_write
 splice_from_pipe
  __splice_from_pipe
   write_pipe_buf
    __kernel_write
     new_sync_write
      generic_file_write_iter
       generic_file_direct_write
        exfat_direct_IO
         do_blockdev_direct_IO
          iov_iter_get_pages

and land in iterate_all_kinds(), which does "return -EFAULT" for our kvec
iter.

Setting exfat's splice_write to iter_file_splice_write fixes this and lets
fsx (which originally detected the problem) run to success from
the xfstests harness.

Signed-off-by: default avatarEric Sandeen <sandeen@sandeen.net>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Git-commit: 035779483072ff7854943dc0cbae82c4e0070d15
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarlixiang <lixiang@codeaurora.org>
parent ab2add7a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment