From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUcSt-0004kf-ET for qemu-devel@nongnu.org; Thu, 18 Sep 2014 10:13:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUcSn-0006T4-8g for qemu-devel@nongnu.org; Thu, 18 Sep 2014 10:13:43 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:53356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUcSn-0006Rl-5R for qemu-devel@nongnu.org; Thu, 18 Sep 2014 10:13:37 -0400 Received: by mail-qg0-f48.google.com with SMTP id f51so1151715qge.7 for ; Thu, 18 Sep 2014 07:13:31 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <541AE887.9050607@redhat.com> Date: Thu, 18 Sep 2014 16:13:27 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1409935888-18552-1-git-send-email-pl@kamp.de> <1409935888-18552-5-git-send-email-pl@kamp.de> In-Reply-To: <1409935888-18552-5-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] block: avoid creating oversized writes in multiwrite_merge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, stefanha@redhat.com, mreitz@redhat.com Il 05/09/2014 18:51, Peter Lieven ha scritto: > Signed-off-by: Peter Lieven > --- > block.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/block.c b/block.c > index fa4c34b..db3f842 100644 > --- a/block.c > +++ b/block.c > @@ -4554,6 +4554,11 @@ static int multiwrite_merge(BlockDriverState *bs, BlockRequest *reqs, > merge = 0; > } > > + if (bs->bl.max_transfer_length && reqs[outidx].nb_sectors + > + reqs[i].nb_sectors > bs->bl.max_transfer_length) { > + merge = 0; > + } > + > if (merge) { > size_t size; > QEMUIOVector *qiov = g_malloc0(sizeof(*qiov)); > So I think if we treat it just as a hint for multiwrite, we can avoid writing code to split oversized requests. They always worked so far, we can certainly wait until we have a real bugfix. Can you drop patch 2 and resend the rest? Thanks, Paolo