]> git.proxmox.com Git - qemu.git/commit
block: avoid creating too large iovecs in multiwrite_merge
authorChristoph Hellwig <hch@lst.de>
Tue, 26 Jan 2010 13:49:08 +0000 (14:49 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 9 Apr 2010 16:41:59 +0000 (18:41 +0200)
commitde17c16e1f5e8fe9e69f9f0187c10f47c073d053
tree20d635678ac36c62454c9f65ceb67a68a9b63176
parent9462695b64ef628e94d7f670feecdaa125ff5f52
block: avoid creating too large iovecs in multiwrite_merge

If we go over the maximum number of iovecs support by syscall we get
back EINVAL from the kernel which translate to I/O errors for the guest.

Add a MAX_IOV defintion for platforms that don't have it.  For now we use
the same 1024 define that's used on Linux and various other platforms,
but until the windows block backend implements some kind of vectored I/O
it doesn't matter.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit e2a305fb13ff0f5cf6ff805555aaa90a5ed5954c)

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
qemu-common.h