]> Git Repo - linux.git/commitdiff
fuse: use iov_iter based generic splice helpers
authorMiklos Szeredi <[email protected]>
Thu, 24 Jan 2019 09:40:17 +0000 (10:40 +0100)
committerMiklos Szeredi <[email protected]>
Wed, 13 Feb 2019 12:15:14 +0000 (13:15 +0100)
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 <[email protected]>
fs/fuse/file.c

index 383843c7c0e97eda3b534905d420f148a9f627e1..3e9e57c765f7c9a5a74c9e2582179095666273f5 100644 (file)
@@ -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  = {
This page took 0.073346 seconds and 4 git commands to generate.