From nobody Wed Dec 17 05:36:59 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1556640951; cv=none; d=zoho.com; s=zohoarc; b=EXi8Q8X+ulBUkctsJwNiR6FCZnQtLWcQ+kMuJeNS32BaNap7FzoWLWOo+xjCOdxMQoisfNCvMlukew+Vcn663FIvqQJRooiKO0zj12MYgcVcXhfBjdwcPg6n9xsjVPAjqHLVfYspWfBfhcfdTxW+XmyofG/UT6Kkh8+MB1CVIf4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556640951; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=QK38dUUq8s0RTVtAYOGBzkGFSrU7AEvhnSN28aocU6A=; b=D2bKNKi2v9xjOQpyEw4CZ9KpHe9FbRuGRnwBIog6o4xBUwFLb9BitvClPP0HFCEAnj6TFPDI6x7qUVWO14lVEj2gMq5Tz/6O8vF3wBYadkyN62EDHAsj0irdRKFWkrsCi1fBZ5eytPkxE6lWlVv8J1HqTCfTHd2IFCK1CtZBN0I= ARC-Authentication-Results: i=1; mx.zoho.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556640951407248.45535033034446; Tue, 30 Apr 2019 09:15:51 -0700 (PDT) Received: from localhost ([127.0.0.1]:49348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLVPu-0001N7-2T for importer@patchew.org; Tue, 30 Apr 2019 12:15:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLUv0-0008Bp-5w for qemu-devel@nongnu.org; Tue, 30 Apr 2019 11:43:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLUuz-0002EI-9U for qemu-devel@nongnu.org; Tue, 30 Apr 2019 11:43:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14899) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLUux-0002CU-2G; Tue, 30 Apr 2019 11:43:39 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F60D307D988; Tue, 30 Apr 2019 15:43:38 +0000 (UTC) Received: from linux.fritz.box.com (unknown [10.36.118.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15A964C7; Tue, 30 Apr 2019 15:43:36 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Tue, 30 Apr 2019 17:42:40 +0200 Message-Id: <20190430154244.30083-24-kwolf@redhat.com> In-Reply-To: <20190430154244.30083-1-kwolf@redhat.com> References: <20190430154244.30083-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 30 Apr 2019 15:43:38 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 23/27] block/stream: use buffer-based io X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Signed-off-by: Kevin Wolf --- block/stream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/stream.c b/block/stream.c index bfaebb861a..1a906fd860 100644 --- a/block/stream.c +++ b/block/stream.c @@ -42,12 +42,10 @@ static int coroutine_fn stream_populate(BlockBackend *b= lk, int64_t offset, uint64_t bytes, void *buf) { - QEMUIOVector qiov =3D QEMU_IOVEC_INIT_BUF(qiov, buf, bytes); - assert(bytes < SIZE_MAX); =20 /* Copy-on-read the unallocated clusters */ - return blk_co_preadv(blk, offset, qiov.size, &qiov, BDRV_REQ_COPY_ON_R= EAD); + return blk_co_pread(blk, offset, bytes, buf, BDRV_REQ_COPY_ON_READ); } =20 static void stream_abort(Job *job) --=20 2.20.1