diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2019-01-24 10:40:17 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-02-13 13:15:14 +0100 |
commit | 3c3db095b68c5df901d837a01a69dcd2693f85f6 (patch) | |
tree | af2ef37abe579a76c39e8bd978cf2eb890bfab99 /fs/fuse/file.c | |
parent | 23c94e1cdcbf5953cd380555d0781caa42311870 (diff) | |
download | linux-3c3db095b68c5df901d837a01a69dcd2693f85f6.tar.bz2 |
fuse: use iov_iter based generic splice helpers
The default splice implementation is grossly inefficient and the iter based
ones work just fine, so use those instead. I've measured an 8x speedup for
splice write (with len = 128k).
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 383843c7c0e9..3e9e57c765f7 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -3156,6 +3156,7 @@ static const struct file_operations fuse_file_operations = { .lock = fuse_file_lock, .flock = fuse_file_flock, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .unlocked_ioctl = fuse_file_ioctl, .compat_ioctl = fuse_file_compat_ioctl, .poll = fuse_file_poll, @@ -3174,11 +3175,12 @@ static const struct file_operations fuse_direct_io_file_operations = { .fsync = fuse_fsync, .lock = fuse_file_lock, .flock = fuse_file_flock, + .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .unlocked_ioctl = fuse_file_ioctl, .compat_ioctl = fuse_file_compat_ioctl, .poll = fuse_file_poll, .fallocate = fuse_file_fallocate, - /* no splice_read */ }; static const struct address_space_operations fuse_file_aops = { |