virtiofsd: use fuse_buf_writev to replace fuse_buf_write for better performance
commitc465bba2c90a810f6e71e4f2646b1b4ee4b478de
authorpiaojun <piaojun@huawei.com>
Fri, 16 Aug 2019 03:42:21 +0000 (16 11:42 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:37 +0000 (23 16:41 +0000)
tree465be9ad34bb81856be8aa0b93368196605fb073
parent9ceaaa15cf21073c2b23058c374f61c30cd39c31
virtiofsd: use fuse_buf_writev to replace fuse_buf_write for better performance

fuse_buf_writev() only handles the normal write in which src is buffer
and dest is fd. Specially if src buffer represents guest physical
address that can't be mapped by the daemon process, IO must be bounced
back to the VMM to do it by fuse_buf_copy().

Signed-off-by: Jun Piao <piaojun@huawei.com>
Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/buffer.c