Commit d7776591 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba

btrfs: wire up iter_file_splice_write

btrfs implements the iter_write op and thus can use the more efficient
iov_iter based splice implementation.  For now falling back to the less
efficient default is pretty harmless, but I have a pending series that
removes the default, and thus would cause btrfs to not support splice
at all.
Reported-by: default avatarAndy Lavr <andy.lavr@gmail.com>
Tested-by: default avatarAndy Lavr <andy.lavr@gmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 230ed397
...@@ -3509,6 +3509,7 @@ const struct file_operations btrfs_file_operations = { ...@@ -3509,6 +3509,7 @@ const struct file_operations btrfs_file_operations = {
.read_iter = generic_file_read_iter, .read_iter = generic_file_read_iter,
.splice_read = generic_file_splice_read, .splice_read = generic_file_splice_read,
.write_iter = btrfs_file_write_iter, .write_iter = btrfs_file_write_iter,
.splice_write = iter_file_splice_write,
.mmap = btrfs_file_mmap, .mmap = btrfs_file_mmap,
.open = btrfs_file_open, .open = btrfs_file_open,
.release = btrfs_release_file, .release = btrfs_release_file,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment