Skip to contentSkip to conversation

btrfs: wire up iter_file_splice_write

PATCH In review Christoph Hellwig 2 participants 3 messages Jul 9, 2020 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/btrfs/file.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/file.c +1 -0
index 2520605afc256e..b0d2c976587e52 100644
@@ -3509,6 +3509,7 @@ const struct file_operations btrfs_file_operations = {
 	.read_iter      = generic_file_read_iter,
 	.splice_read	= generic_file_splice_read,
 	.write_iter	= btrfs_file_write_iter,
+	.splice_write	= iter_file_splice_write,
 	.mmap		= btrfs_file_mmap,
 	.open		= btrfs_file_open,
 	.release	= btrfs_release_file,
Signature · 1 line
2.26.2
#1 lore raw
Quoted 5 lines · Christoph Hellwig

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.

Do you want this patch to go in this cycle? I have some more patches queued and don't mind adding it if it makes development of your patchset easier.

#2 lore raw
Quoted 10 lines · David Sterba
Quoted 5 lines · Christoph Hellwig

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.

Do you want this patch to go in this cycle? I have some more patches queued and don't mind adding it if it makes development of your patchset easier.

That would be great.