mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
virtiofsd: Fast path for virtio read
Readv the data straight into the guests buffer. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> With fix by: Signed-off-by: Eryu Guan <eguan@linux.alibaba.com> Reviewed-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
81bfc42dcf
commit
eb49d187ef
3 changed files with 171 additions and 0 deletions
|
@ -475,6 +475,11 @@ static int fuse_send_data_iov_fallback(struct fuse_session *se,
|
|||
return fuse_send_msg(se, ch, iov, iov_count);
|
||||
}
|
||||
|
||||
if (fuse_lowlevel_is_virtio(se) && buf->count == 1 &&
|
||||
buf->buf[0].flags == (FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK)) {
|
||||
return virtio_send_data_iov(se, ch, iov, iov_count, buf, len);
|
||||
}
|
||||
|
||||
abort(); /* Will have taken vhost path */
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue