Stefan Hajnoczi cae98cb87d block/mirror: limit qiov to IOV_MAX elements
If mirror has more free buffers than IOV_MAX, preadv(2)/pwritev(2)
EINVAL failures may be encountered.

It is possible to trigger this by setting granularity to a low value
like 8192.

This patch stops appending chunks once IOV_MAX is reached.

The spurious EINVAL failure can be reproduced with a qcow2 image file
and the following QMP invocation:

  qmp.command('drive-mirror', device='virtio0', target='/tmp/r7.s1',
              granularity=8192, sync='full', mode='absolute-paths',
              format='raw')

While the guest is running dd if=/dev/zero of=/var/tmp/foo oflag=direct
bs=4k.

Cc: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1435761950-26714-1-git-send-email-stefanha@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
2015-08-06 04:41:09 -04:00
2015-07-08 13:11:01 +02:00
2015-08-05 16:56:34 +03:00
2015-07-07 14:54:55 +02:00
2015-07-09 15:20:40 +02:00
2015-08-01 09:39:50 +02:00
2015-07-28 14:19:16 +01:00
2015-07-24 13:57:44 +02:00
2014-06-16 13:24:35 +02:00
2015-06-12 06:42:34 +02:00
2015-07-14 21:50:13 -04:00
2015-07-27 22:44:47 +03:00
2015-04-30 16:05:48 +03:00
2015-06-12 13:42:17 +01:00
2015-07-07 09:22:40 +01:00
2015-07-14 17:15:23 +02:00
2015-07-27 22:44:47 +03:00
2015-07-27 22:44:47 +03:00
2015-07-24 13:57:45 +02:00
2015-07-24 13:57:45 +02:00
2015-07-24 13:57:45 +02:00
2015-05-11 08:59:07 -04:00
2015-05-22 15:58:22 -04:00
2015-06-11 10:13:28 +01:00
2015-08-05 17:02:58 +01:00
2015-06-23 17:46:20 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
QEMU With E2K User Support
Readme 459 MiB
Languages
C 83.1%
C++ 6.3%
Python 3.2%
Dylan 2.8%
Shell 1.6%
Other 2.8%