]> git.proxmox.com Git - qemu.git/commit
dataplane: handle misaligned virtio-blk requests
authorStefan Hajnoczi <stefanha@redhat.com>
Fri, 11 Jan 2013 15:41:29 +0000 (16:41 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 14 Jan 2013 09:06:57 +0000 (10:06 +0100)
commitde0161c0d553f2aaf6118ca87f978a5e6b4a9732
treef596da5ee25049899eeeeebab9aff28ca54bf06e
parentb5ef1aab945c1b04740574064b13eb93f1572587
dataplane: handle misaligned virtio-blk requests

O_DIRECT on Linux has alignment requirements on I/O buffers and
misaligned requests result in -EINVAL.  The Linux virtio_blk guest
driver usually submits aligned requests so I forgot to handle misaligned
requests.

It turns out that virtio-win guest drivers submit misaligned requests.
Handle them using a bounce buffer that meets alignment requirements.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/dataplane/virtio-blk.c