aboutsummaryrefslogtreecommitdiff
path: root/tools/virtiofsd/fuse_virtio.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-01-04 18:23:00 +0000
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:36 +0000
commit469f9d2fc405b0508e6cf1b4b5bbcadfc82064e5 (patch)
tree09314a7b47ef5e99696d9b1ec6b8e7df810d02b1 /tools/virtiofsd/fuse_virtio.c
parent25dae28c58d7e706b5d5db99042c9db3cef2e657 (diff)
virtiofsd: Plumb fuse_bufvec through to do_write_buf
Let fuse_session_process_buf_int take a fuse_bufvec * instead of a fuse_buf; and then through to do_write_buf - where in the best case it can pass that straight through to op.write_buf without copying (other than skipping a header). Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/fuse_virtio.c')
-rw-r--r--tools/virtiofsd/fuse_virtio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 635f87756a..fd588a4829 100644
--- a/tools/virtiofsd/fuse_virtio.c
+++ b/tools/virtiofsd/fuse_virtio.c
@@ -501,7 +501,8 @@ static void *fv_queue_thread(void *opaque)
/* TODO! Endianness of header */
/* TODO: Add checks for fuse_session_exited */
- fuse_session_process_buf_int(se, &fbuf, &ch);
+ struct fuse_bufvec bufv = { .buf[0] = fbuf, .count = 1 };
+ fuse_session_process_buf_int(se, &bufv, &ch);
if (!qi->reply_sent) {
fuse_log(FUSE_LOG_DEBUG, "%s: elem %d no reply sent\n",