From: Anthony Liguori <anthony@codemonkey.ws>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: prevent multiwrite_merge from creating too large iovecs
Date: Wed, 20 Jan 2010 08:56:23 -0600 [thread overview]
Message-ID: <4B571997.8050603@codemonkey.ws> (raw)
In-Reply-To: <20100119211539.GA4383@lst.de>
On 01/19/2010 03:15 PM, Christoph Hellwig wrote:
> 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.
>
> Signed-off-by: Christoph Hellwig<hch@lst.de>
>
Applied. Thanks.
Regards,
Anthony Liguori
> Index: qemu/block.c
> ===================================================================
> --- qemu.orig/block.c 2010-01-19 22:10:19.797003226 +0100
> +++ qemu/block.c 2010-01-19 22:11:08.226005767 +0100
> @@ -1711,6 +1711,10 @@ static int multiwrite_merge(BlockDriverS
> merge = bs->drv->bdrv_merge_requests(bs,&reqs[outidx],&reqs[i]);
> }
>
> + if (reqs[outidx].qiov->niov + reqs[i].qiov->niov + 1> IOV_MAX) {
> + merge = 0;
> + }
> +
> if (merge) {
> size_t size;
> QEMUIOVector *qiov = qemu_mallocz(sizeof(*qiov));
>
>
>
>
prev parent reply other threads:[~2010-01-20 14:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 21:15 [Qemu-devel] [PATCH] block: prevent multiwrite_merge from creating too large iovecs Christoph Hellwig
2010-01-20 11:37 ` Kevin Wolf
2010-01-20 16:24 ` Christoph Hellwig
2010-01-20 16:29 ` Kevin Wolf
2010-01-26 9:21 ` Christoph Hellwig
2010-01-26 13:08 ` Anthony Liguori
2010-01-26 13:42 ` Christoph Hellwig
2010-01-20 14:56 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B571997.8050603@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=hch@lst.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.