From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493411925203167.31395546224007; Fri, 28 Apr 2017 13:38:45 -0700 (PDT) Received: from localhost ([::1]:38716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cf5-0005Im-Ih for importer@patchew.org; Fri, 28 Apr 2017 16:38:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CaR-0001Mt-5d for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:33:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CaQ-00012S-BH for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:33:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55520) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CaM-0000zc-Co; Fri, 28 Apr 2017 16:33:50 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 35650C051664; Fri, 28 Apr 2017 20:33:49 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id D46DB96519; Fri, 28 Apr 2017 20:33:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 35650C051664 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 35650C051664 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:09 +0200 Message-Id: <1493411622-5343-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Apr 2017 20:33:49 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 01/34] block: Constify data passed by pointer to blk_name 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Krzysztof Kozlowski blk_name() is not modifying data passed to it through pointer and it returns also a pointer to const so the argument can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Kevin Wolf --- block/block-backend.c | 2 +- include/sysemu/block-backend.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 7405024..ae3d771 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -420,7 +420,7 @@ void monitor_remove_blk(BlockBackend *blk) * Return @blk's name, a non-null string. * Returns an empty string iff @blk is not referenced by the monitor. */ -const char *blk_name(BlockBackend *blk) +const char *blk_name(const BlockBackend *blk) { return blk->name ?: ""; } diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 7462228..133e542 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -99,7 +99,7 @@ int blk_get_refcnt(BlockBackend *blk); void blk_ref(BlockBackend *blk); void blk_unref(BlockBackend *blk); void blk_remove_all_bs(void); -const char *blk_name(BlockBackend *blk); +const char *blk_name(const BlockBackend *blk); BlockBackend *blk_by_name(const char *name); BlockBackend *blk_next(BlockBackend *blk); bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp); --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493411774541821.8417204037371; Fri, 28 Apr 2017 13:36:14 -0700 (PDT) Received: from localhost ([::1]:38706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Ccf-0002xp-3o for importer@patchew.org; Fri, 28 Apr 2017 16:36:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CaR-0001Mr-57 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:33:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CaQ-00012e-IJ for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:33:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50194) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CaO-00010Y-JY; Fri, 28 Apr 2017 16:33:52 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B73F9FDDA; Fri, 28 Apr 2017 20:33:51 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id AABCF9533F; Fri, 28 Apr 2017 20:33:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8B73F9FDDA Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8B73F9FDDA From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:10 +0200 Message-Id: <1493411622-5343-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 28 Apr 2017 20:33:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 02/34] file-posix: Remove unnecessary includes 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Kevin Wolf --- block/file-posix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 0c48968..ade71db 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -25,8 +25,6 @@ #include "qapi/error.h" #include "qemu/cutils.h" #include "qemu/error-report.h" -#include "qemu/timer.h" -#include "qemu/log.h" #include "block/block_int.h" #include "qemu/module.h" #include "trace.h" --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493411769381172.78305429908403; Fri, 28 Apr 2017 13:36:09 -0700 (PDT) Received: from localhost ([::1]:38705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CcZ-0002tE-FN for importer@patchew.org; Fri, 28 Apr 2017 16:36:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CaT-0001PI-C6 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:33:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CaS-00014f-Kx for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:33:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43712) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CaQ-00012G-As; Fri, 28 Apr 2017 16:33:54 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DEC770730; Fri, 28 Apr 2017 20:33:53 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03ECB96518; Fri, 28 Apr 2017 20:33:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4DEC770730 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4DEC770730 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:11 +0200 Message-Id: <1493411622-5343-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 28 Apr 2017 20:33:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/34] file-win32: Remove unnecessary include 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Kevin Wolf --- block/file-win32.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/file-win32.c b/block/file-win32.c index 800fabd..e132ba1 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/cutils.h" -#include "qemu/timer.h" #include "block/block_int.h" #include "qemu/module.h" #include "block/raw-aio.h" --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149341177713152.571966073529666; Fri, 28 Apr 2017 13:36:17 -0700 (PDT) Received: from localhost ([::1]:38707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cch-00030G-RX for importer@patchew.org; Fri, 28 Apr 2017 16:36:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CaY-0001Ss-86 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CaU-00015o-IA for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24209) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CaS-00013i-5X; Fri, 28 Apr 2017 16:33:56 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D55CC04F4C5; Fri, 28 Apr 2017 20:33:55 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id C57E19533F; Fri, 28 Apr 2017 20:33:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1D55CC04F4C5 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1D55CC04F4C5 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:12 +0200 Message-Id: <1493411622-5343-5-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Apr 2017 20:33:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/34] Revert "block/io: Comment out permission assertions" 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74. This commit was necessary for the 2.9 release because we were unable to fix the underlying issue(s) in time. However, we will be for 2.10. Signed-off-by: Max Reitz Acked-by: Fam Zheng Signed-off-by: Kevin Wolf --- block.c | 6 +----- block/io.c | 12 ++---------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/block.c b/block.c index 5db266b..ceaca44 100644 --- a/block.c +++ b/block.c @@ -3313,11 +3313,7 @@ int bdrv_truncate(BdrvChild *child, int64_t offset) BlockDriver *drv =3D bs->drv; int ret; =20 - /* FIXME: Some format block drivers use this function instead of impli= citly - * growing their file by writing beyond its end. - * See bdrv_aligned_pwritev() for an explanation why we current= ly - * cannot assert this permission in that case. */ - // assert(child->perm & BLK_PERM_RESIZE); + assert(child->perm & BLK_PERM_RESIZE); =20 if (!drv) return -ENOMEDIUM; diff --git a/block/io.c b/block/io.c index a7142e0..a32fd1d 100644 --- a/block/io.c +++ b/block/io.c @@ -1362,16 +1362,8 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChi= ld *child, assert(!waited || !req->serialising); assert(req->overlap_offset <=3D offset); assert(offset + bytes <=3D req->overlap_offset + req->overlap_bytes); - /* FIXME: Block migration uses the BlockBackend of the guest device at= a - * point when it has not yet taken write permissions. This will= be - * fixed by a future patch, but for now we have to bypass this - * assertion for block migration to work. */ - // assert(child->perm & BLK_PERM_WRITE); - /* FIXME: Because of the above, we also cannot guarantee that all form= at - * BDS take the BLK_PERM_RESIZE permission on their file BDS, s= ince - * they are not obligated to do so if they do not have any pare= nt - * that has taken the permission to write to them. */ - // assert(end_sector <=3D bs->total_sectors || child->perm & BLK_PERM_= RESIZE); + assert(child->perm & BLK_PERM_WRITE); + assert(end_sector <=3D bs->total_sectors || child->perm & BLK_PERM_RES= IZE); =20 ret =3D notifier_with_return_list_notify(&bs->before_write_notifiers, = req); =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493411786291989.682064622037; Fri, 28 Apr 2017 13:36:26 -0700 (PDT) Received: from localhost ([::1]:38708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Ccq-00037c-Qy for importer@patchew.org; Fri, 28 Apr 2017 16:36:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cae-0001X2-2x for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cab-00019g-Oj for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55662) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CaT-000153-UM; Fri, 28 Apr 2017 16:33:58 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E33C2C04D2B3; Fri, 28 Apr 2017 20:33:56 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9322F96518; Fri, 28 Apr 2017 20:33:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E33C2C04D2B3 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E33C2C04D2B3 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:13 +0200 Message-Id: <1493411622-5343-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Apr 2017 20:33:57 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 05/34] qemu-img: simplify img_convert 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Peter Lieven img_convert has been around before there was an ImgConvertState or a block backend, but it has never been modified to directly use these structs. Change this by parsing parameters directly into the ImgConvertState and directly use BlockBackend where possible. Furthermore variable initialization has been reworked and sorted. Signed-off-by: Peter Lieven Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-img.c | 201 +++++++++++++++++++++++++--------------------------------= ---- 1 file changed, 81 insertions(+), 120 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index bbe1574..b94fc11 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1522,7 +1522,7 @@ typedef struct ImgConvertState { int min_sparse; size_t cluster_sectors; size_t buf_sectors; - int num_coroutines; + long num_coroutines; int running_coroutines; Coroutine *co[MAX_COROUTINES]; int64_t wait_sector_num[MAX_COROUTINES]; @@ -1916,39 +1916,29 @@ static int convert_do_copy(ImgConvertState *s) =20 static int img_convert(int argc, char **argv) { - int c, bs_n, bs_i, compress, cluster_sectors, skip_create; - int64_t ret =3D 0; - int progress =3D 0, flags, src_flags; - bool writethrough, src_writethrough; - const char *fmt, *out_fmt, *cache, *src_cache, *out_baseimg, *out_file= name; + int c, bs_i, flags, src_flags =3D 0; + const char *fmt =3D NULL, *out_fmt =3D "raw", *cache =3D "unsafe", + *src_cache =3D BDRV_DEFAULT_CACHE, *out_baseimg =3D NULL, + *out_filename, *out_baseimg_param, *snapshot_name =3D NULL; BlockDriver *drv, *proto_drv; - BlockBackend **blk =3D NULL, *out_blk =3D NULL; - BlockDriverState **bs =3D NULL, *out_bs =3D NULL; - int64_t total_sectors; - int64_t *bs_sectors =3D NULL; - size_t bufsectors =3D IO_BUF_SIZE / BDRV_SECTOR_SIZE; BlockDriverInfo bdi; - QemuOpts *opts =3D NULL; + BlockDriverState *out_bs; + QemuOpts *opts =3D NULL, *sn_opts =3D NULL; QemuOptsList *create_opts =3D NULL; - const char *out_baseimg_param; char *options =3D NULL; - const char *snapshot_name =3D NULL; - int min_sparse =3D 8; /* Need at least 4k of zeros for sparse detectio= n */ - bool quiet =3D false; Error *local_err =3D NULL; - QemuOpts *sn_opts =3D NULL; - ImgConvertState state; - bool image_opts =3D false; - bool wr_in_order =3D true; - long num_coroutines =3D 8; + bool writethrough, src_writethrough, quiet =3D false, image_opts =3D f= alse, + skip_create =3D false, progress =3D false; + int64_t ret =3D -EINVAL; + + ImgConvertState s =3D (ImgConvertState) { + /* Need at least 4k of zeros for sparse detection */ + .min_sparse =3D 8, + .buf_sectors =3D IO_BUF_SIZE / BDRV_SECTOR_SIZE, + .wr_in_order =3D true, + .num_coroutines =3D 8, + }; =20 - fmt =3D NULL; - out_fmt =3D "raw"; - cache =3D "unsafe"; - src_cache =3D BDRV_DEFAULT_CACHE; - out_baseimg =3D NULL; - compress =3D 0; - skip_create =3D 0; for(;;) { static const struct option long_options[] =3D { {"help", no_argument, 0, 'h'}, @@ -1981,22 +1971,19 @@ static int img_convert(int argc, char **argv) out_baseimg =3D optarg; break; case 'c': - compress =3D 1; + s.compressed =3D true; break; case 'e': error_report("option -e is deprecated, please use \'-o " "encryption\' instead!"); - ret =3D -1; goto fail_getopt; case '6': error_report("option -6 is deprecated, please use \'-o " "compat6\' instead!"); - ret =3D -1; goto fail_getopt; case 'o': if (!is_valid_option_list(optarg)) { error_report("Invalid option list: %s", optarg); - ret =3D -1; goto fail_getopt; } if (!options) { @@ -2017,7 +2004,6 @@ static int img_convert(int argc, char **argv) if (!sn_opts) { error_report("Failed in parsing snapshot param '%s'", optarg); - ret =3D -1; goto fail_getopt; } } else { @@ -2031,15 +2017,14 @@ static int img_convert(int argc, char **argv) sval =3D cvtnum(optarg); if (sval < 0) { error_report("Invalid minimum zero buffer size for sparse = output specified"); - ret =3D -1; goto fail_getopt; } =20 - min_sparse =3D sval / BDRV_SECTOR_SIZE; + s.min_sparse =3D sval / BDRV_SECTOR_SIZE; break; } case 'p': - progress =3D 1; + progress =3D true; break; case 't': cache =3D optarg; @@ -2051,19 +2036,18 @@ static int img_convert(int argc, char **argv) quiet =3D true; break; case 'n': - skip_create =3D 1; + skip_create =3D true; break; case 'm': - if (qemu_strtol(optarg, NULL, 0, &num_coroutines) || - num_coroutines < 1 || num_coroutines > MAX_COROUTINES) { + if (qemu_strtol(optarg, NULL, 0, &s.num_coroutines) || + s.num_coroutines < 1 || s.num_coroutines > MAX_COROUTINES)= { error_report("Invalid number of coroutines. Allowed number= of" " coroutines is between 1 and %d", MAX_COROUT= INES); - ret =3D -1; goto fail_getopt; } break; case 'W': - wr_in_order =3D false; + s.wr_in_order =3D false; break; case OPTION_OBJECT: opts =3D qemu_opts_parse_noisily(&qemu_object_opts, @@ -2084,83 +2068,79 @@ static int img_convert(int argc, char **argv) goto fail_getopt; } =20 - if (!wr_in_order && compress) { + if (!s.wr_in_order && s.compressed) { error_report("Out of order write and compress are mutually exclusi= ve"); - ret =3D -1; goto fail_getopt; } =20 - /* Initialize before goto out */ - if (quiet) { - progress =3D 0; - } - qemu_progress_init(progress, 1.0); - - bs_n =3D argc - optind - 1; - out_filename =3D bs_n >=3D 1 ? argv[argc - 1] : NULL; + s.src_num =3D argc - optind - 1; + out_filename =3D s.src_num >=3D 1 ? argv[argc - 1] : NULL; =20 if (options && has_help_option(options)) { ret =3D print_block_option_help(out_filename, out_fmt); - goto out; + goto fail_getopt; } =20 - if (bs_n < 1) { - error_exit("Must specify image file name"); + if (s.src_num < 1) { + error_report("Must specify image file name"); + goto fail_getopt; } =20 =20 - if (bs_n > 1 && out_baseimg) { + if (s.src_num > 1 && out_baseimg) { error_report("-B makes no sense when concatenating multiple input " "images"); - ret =3D -1; - goto out; + goto fail_getopt; } =20 - src_flags =3D 0; + /* ret is still -EINVAL until here */ ret =3D bdrv_parse_cache_mode(src_cache, &src_flags, &src_writethrough= ); if (ret < 0) { error_report("Invalid source cache option: %s", src_cache); - goto out; + goto fail_getopt; } =20 + /* Initialize before goto out */ + if (quiet) { + progress =3D false; + } + qemu_progress_init(progress, 1.0); qemu_progress_print(0, 100); =20 - blk =3D g_new0(BlockBackend *, bs_n); - bs =3D g_new0(BlockDriverState *, bs_n); - bs_sectors =3D g_new(int64_t, bs_n); + s.src =3D g_new0(BlockBackend *, s.src_num); + s.src_sectors =3D g_new(int64_t, s.src_num); =20 - total_sectors =3D 0; - for (bs_i =3D 0; bs_i < bs_n; bs_i++) { - blk[bs_i] =3D img_open(image_opts, argv[optind + bs_i], - fmt, src_flags, src_writethrough, quiet); - if (!blk[bs_i]) { + for (bs_i =3D 0; bs_i < s.src_num; bs_i++) { + s.src[bs_i] =3D img_open(image_opts, argv[optind + bs_i], + fmt, src_flags, src_writethrough, quiet); + if (!s.src[bs_i]) { ret =3D -1; goto out; } - bs[bs_i] =3D blk_bs(blk[bs_i]); - bs_sectors[bs_i] =3D blk_nb_sectors(blk[bs_i]); - if (bs_sectors[bs_i] < 0) { + s.src_sectors[bs_i] =3D blk_nb_sectors(s.src[bs_i]); + if (s.src_sectors[bs_i] < 0) { error_report("Could not get size of %s: %s", - argv[optind + bs_i], strerror(-bs_sectors[bs_i])); + argv[optind + bs_i], strerror(-s.src_sectors[bs_i= ])); ret =3D -1; goto out; } - total_sectors +=3D bs_sectors[bs_i]; + s.total_sectors +=3D s.src_sectors[bs_i]; } =20 if (sn_opts) { - bdrv_snapshot_load_tmp(bs[0], + bdrv_snapshot_load_tmp(blk_bs(s.src[0]), qemu_opt_get(sn_opts, SNAPSHOT_OPT_ID), qemu_opt_get(sn_opts, SNAPSHOT_OPT_NAME), &local_err); } else if (snapshot_name !=3D NULL) { - if (bs_n > 1) { + if (s.src_num > 1) { error_report("No support for concatenating multiple snapshot"); ret =3D -1; goto out; } =20 - bdrv_snapshot_load_tmp_by_id_or_name(bs[0], snapshot_name, &local_= err); + bdrv_snapshot_load_tmp_by_id_or_name(blk_bs(s.src[0]), snapshot_na= me, + &local_err); } if (local_err) { error_reportf_err(local_err, "Failed to load snapshot: "); @@ -2211,7 +2191,7 @@ static int img_convert(int argc, char **argv) } } =20 - qemu_opt_set_number(opts, BLOCK_OPT_SIZE, total_sectors * 512, + qemu_opt_set_number(opts, BLOCK_OPT_SIZE, s.total_sectors * 512, &error_abort); ret =3D add_old_style_options(out_fmt, opts, out_baseimg, NULL); if (ret < 0) { @@ -2224,9 +2204,10 @@ static int img_convert(int argc, char **argv) if (out_baseimg_param) { out_baseimg =3D out_baseimg_param; } + s.target_has_backing =3D (bool) out_baseimg; =20 /* Check if compression is supported */ - if (compress) { + if (s.compressed) { bool encryption =3D qemu_opt_get_bool(opts, BLOCK_OPT_ENCRYPT, false); const char *preallocation =3D @@ -2265,7 +2246,7 @@ static int img_convert(int argc, char **argv) } } =20 - flags =3D min_sparse ? (BDRV_O_RDWR | BDRV_O_UNMAP) : BDRV_O_RDWR; + flags =3D s.min_sparse ? (BDRV_O_RDWR | BDRV_O_UNMAP) : BDRV_O_RDWR; ret =3D bdrv_parse_cache_mode(cache, &flags, &writethrough); if (ret < 0) { error_report("Invalid cache option: %s", cache); @@ -2277,64 +2258,48 @@ static int img_convert(int argc, char **argv) * the bdrv_create() call which takes different params. * Not critical right now, so fix can wait... */ - out_blk =3D img_open_file(out_filename, out_fmt, flags, writethrough, = quiet); - if (!out_blk) { + s.target =3D img_open_file(out_filename, out_fmt, flags, writethrough,= quiet); + if (!s.target) { ret =3D -1; goto out; } - out_bs =3D blk_bs(out_blk); + out_bs =3D blk_bs(s.target); =20 /* increase bufsectors from the default 4096 (2M) if opt_transfer * or discard_alignment of the out_bs is greater. Limit to 32768 (16MB) * as maximum. */ - bufsectors =3D MIN(32768, - MAX(bufsectors, - MAX(out_bs->bl.opt_transfer >> BDRV_SECTOR_BITS, - out_bs->bl.pdiscard_alignment >> - BDRV_SECTOR_BITS))); + s.buf_sectors =3D MIN(32768, + MAX(s.buf_sectors, + MAX(out_bs->bl.opt_transfer >> BDRV_SECTOR_BIT= S, + out_bs->bl.pdiscard_alignment >> + BDRV_SECTOR_BITS))); =20 if (skip_create) { - int64_t output_sectors =3D blk_nb_sectors(out_blk); + int64_t output_sectors =3D blk_nb_sectors(s.target); if (output_sectors < 0) { error_report("unable to get output image length: %s", strerror(-output_sectors)); ret =3D -1; goto out; - } else if (output_sectors < total_sectors) { + } else if (output_sectors < s.total_sectors) { error_report("output file is smaller than input file"); ret =3D -1; goto out; } } =20 - cluster_sectors =3D 0; ret =3D bdrv_get_info(out_bs, &bdi); if (ret < 0) { - if (compress) { + if (s.compressed) { error_report("could not get block driver info"); goto out; } } else { - compress =3D compress || bdi.needs_compressed_writes; - cluster_sectors =3D bdi.cluster_size / BDRV_SECTOR_SIZE; - } - - state =3D (ImgConvertState) { - .src =3D blk, - .src_sectors =3D bs_sectors, - .src_num =3D bs_n, - .total_sectors =3D total_sectors, - .target =3D out_blk, - .compressed =3D compress, - .target_has_backing =3D (bool) out_baseimg, - .min_sparse =3D min_sparse, - .cluster_sectors =3D cluster_sectors, - .buf_sectors =3D bufsectors, - .wr_in_order =3D wr_in_order, - .num_coroutines =3D num_coroutines, - }; - ret =3D convert_do_copy(&state); + s.compressed =3D s.compressed || bdi.needs_compressed_writes; + s.cluster_sectors =3D bdi.cluster_size / BDRV_SECTOR_SIZE; + } =20 + ret =3D convert_do_copy(&s); out: if (!ret) { qemu_progress_print(100, 0); @@ -2343,22 +2308,18 @@ out: qemu_opts_del(opts); qemu_opts_free(create_opts); qemu_opts_del(sn_opts); - blk_unref(out_blk); - g_free(bs); - if (blk) { - for (bs_i =3D 0; bs_i < bs_n; bs_i++) { - blk_unref(blk[bs_i]); + blk_unref(s.target); + if (s.src) { + for (bs_i =3D 0; bs_i < s.src_num; bs_i++) { + blk_unref(s.src[bs_i]); } - g_free(blk); + g_free(s.src); } - g_free(bs_sectors); + g_free(s.src_sectors); fail_getopt: g_free(options); =20 - if (ret) { - return 1; - } - return 0; + return !!ret; } =20 =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493411921043267.308134713207; Fri, 28 Apr 2017 13:38:41 -0700 (PDT) Received: from localhost ([::1]:38715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cf1-0005F9-1E for importer@patchew.org; Fri, 28 Apr 2017 16:38:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Caa-0001U8-MM for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CaZ-00018D-An for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49222) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CaV-000161-VE; Fri, 28 Apr 2017 16:34:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CF40426AC7B; Fri, 28 Apr 2017 20:33:58 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 656BE98243; Fri, 28 Apr 2017 20:33:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CF40426AC7B Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CF40426AC7B From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:14 +0200 Message-Id: <1493411622-5343-7-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 28 Apr 2017 20:33:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 06/34] migration: Call blk_resume_after_migration() for postcopy 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Commit d35ff5e6 ('block: Ignore guest dev permissions during incoming migration') added blk_resume_after_migration() to the precopy migration path, but neglected to add it to the duplicated code that is used for postcopy migration. This means that the guest device doesn't request the necessary permissions, which ultimately led to failing assertions. Add the missing blk_resume_after_migration() to the postcopy path. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- migration/savevm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index 03ae1bd..a00c1ab 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1622,6 +1622,14 @@ static void loadvm_postcopy_handle_run_bh(void *opaq= ue) error_report_err(local_err); } =20 + /* If we get an error here, just don't restart the VM yet. */ + blk_resume_after_migration(&local_err); + if (local_err) { + error_free(local_err); + local_err =3D NULL; + autostart =3D false; + } + trace_loadvm_postcopy_handle_run_cpu_sync(); cpu_synchronize_all_post_init(); =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412638574796.7281883506331; Fri, 28 Apr 2017 13:50:38 -0700 (PDT) Received: from localhost ([::1]:38792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cqb-000795-0R for importer@patchew.org; Fri, 28 Apr 2017 16:50:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cb8-0001yK-Hh for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cax-0001In-H1 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17161) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CaZ-00017h-Fp; Fri, 28 Apr 2017 16:34:03 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 71FFD40F15; Fri, 28 Apr 2017 20:34:02 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37CD096518; Fri, 28 Apr 2017 20:33:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 71FFD40F15 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 71FFD40F15 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:15 +0200 Message-Id: <1493411622-5343-8-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 28 Apr 2017 20:34:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 07/34] qemu-iotests: Filter HMP readline escape characters 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The only thing the escape characters achieve is making the reference output unreadable and lines that are potentially so long that git doesn't want to put them into an email any more. Let's filter them out. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/qemu-iotests/028.out | 2 +- tests/qemu-iotests/051 | 3 +- tests/qemu-iotests/051.out | 106 +++++++++++++++---------------- tests/qemu-iotests/051.pc.out | 132 +++++++++++++++++++----------------= ---- tests/qemu-iotests/068 | 4 +- tests/qemu-iotests/068.out | 6 +- tests/qemu-iotests/130.out | 4 +- tests/qemu-iotests/142 | 2 +- tests/qemu-iotests/142.out | 10 +-- tests/qemu-iotests/145 | 3 +- tests/qemu-iotests/145.out | 2 +- tests/qemu-iotests/common.filter | 7 +++ tests/qemu-iotests/common.qemu | 4 +- 13 files changed, 147 insertions(+), 138 deletions(-) diff --git a/tests/qemu-iotests/028.out b/tests/qemu-iotests/028.out index acd2870..7d54aeb 100644 --- a/tests/qemu-iotests/028.out +++ b/tests/qemu-iotests/028.out @@ -469,7 +469,7 @@ No errors were found on the image. block-backup =20 Formatting 'TEST_DIR/t.IMGFMT.copy', fmt=3DIMGFMT size=3D4294968832 backin= g_file=3DTEST_DIR/t.IMGFMT.base backing_fmt=3DIMGFMT -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block-j=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block-jo=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block-job=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block-jobs=1B[K +(qemu) info block-jobs No active jobs =3D=3D=3D IO: pattern 195 read 512/512 bytes at offset 3221194240 diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 630cb7a..7c78a02 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -60,7 +60,8 @@ function do_run_qemu() =20 function run_qemu() { - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_gener= ated_node_ids + do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | + _filter_generated_node_ids | _filter_hmp } =20 size=3D128M diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index 7524c62..3b7b040 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -58,12 +58,12 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive file=3DTEST_DIR/t.qcow2,driver=3Dqcow2,backing.file.filena= me=3DTEST_DIR/t.qcow2.orig,if=3Dnone,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writeback Backing file: TEST_DIR/t.qcow2.orig (chain depth: 1) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,driver=3Draw,backing.file.filename= =3DTEST_DIR/t.qcow2.orig QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,driver=3Draw,backing.file.filena= me=3DTEST_DIR/t.qcow2.orig: Driver doesn't support backing files @@ -79,11 +79,11 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,file.backing.= driver=3Dqcow2,file.backing.f =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Don QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Doff QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3D QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3D= : Parameter 'lazy-refcounts' expects 'on' or 'off' @@ -103,7 +103,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow= 2,lazy-refcounts=3Don: Lazy ref =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Doff QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 =20 =3D=3D=3D No medium =3D=3D=3D @@ -117,93 +117,93 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dvirtio,readonly=3Don QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 =20 =3D=3D=3D Cache modes =3D=3D=3D =20 Testing: -drive driver=3Dnull-co,cache=3Dnone QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Ddirectsync QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dwriteback QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dwritethrough QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dunsafe QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dinvalid_value QEMU_PROG: -drive driver=3Dnull-co,cache=3Dinvalid_value: invalid cache op= tion =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dwriteback,backing.file.fil= ename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-name= =3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,if= =3Dnone,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writeback Backing file: TEST_DIR/t.qcow2.base (chain depth: 1) -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block f=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block fi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block file=1B[K +(qemu) info block file =20 file: TEST_DIR/t.qcow2 (file) Cache mode: writeback -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K +(qemu) info block backing backing: TEST_DIR/t.qcow2.base (qcow2, read-only) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[Dinfo block backing-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-f= =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-fi=1B[K=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinf o block backing-fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= ing-file=1B[K +(qemu) info block backing-file =20 backing-file: TEST_DIR/t.qcow2.base (file, read-only) Cache mode: writeback, ignore flushes -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dwritethrough,backing.file.= filename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-n= ame=3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,i= f=3Dnone,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writethrough Backing file: TEST_DIR/t.qcow2.base (chain depth: 1) -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block f=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block fi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block file=1B[K +(qemu) info block file =20 file: TEST_DIR/t.qcow2 (file) Cache mode: writeback -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K +(qemu) info block backing backing: TEST_DIR/t.qcow2.base (qcow2, read-only) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[Dinfo block backing-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-f= =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-fi=1B[K=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinf o block backing-fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= ing-file=1B[K +(qemu) info block backing-file =20 backing-file: TEST_DIR/t.qcow2.base (file, read-only) Cache mode: writeback, ignore flushes -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dunsafe,backing.file.filena= me=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-name=3D= backing,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,if=3Dno= ne,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writeback, ignore flushes Backing file: TEST_DIR/t.qcow2.base (chain depth: 1) -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block f=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block fi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block file=1B[K +(qemu) info block file =20 file: TEST_DIR/t.qcow2 (file) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K +(qemu) info block backing backing: TEST_DIR/t.qcow2.base (qcow2, read-only) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[Dinfo block backing-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-f= =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-fi=1B[K=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinf o block backing-fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= ing-file=1B[K +(qemu) info block backing-file =20 backing-file: TEST_DIR/t.qcow2.base (file, read-only) Cache mode: writeback, ignore flushes -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinvalid_value,backing.file= .filename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-= name=3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,= if=3Dnone,id=3Ddrive0 -nodefaults QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinvalid_value,backing.fi= le.filename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.nod= e-name=3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfil= e,if=3Dnone,id=3Ddrive0: invalid cache option @@ -213,7 +213,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinval= id_value,backing.file.filenam =20 Testing: -drive file=3DTEST_DIR/t.qcow2,file.driver=3Dfile QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 =20 =3D=3D=3D Leaving out required options =3D=3D=3D @@ -307,15 +307,15 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,throttling.= bps-total=3D-5: bps/iops/max va =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D1 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D1000000000000000 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D1000000000000001 QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,bps=3D1000000000000001: bps/iops= /max values must be within [0, 1000000000000000] @@ -337,11 +337,11 @@ QEMU_PROG: -drive file.filename=3Dfoo:bar: Could not = open 'foo:bar': No such file =20 Testing: -hda file:TEST_DIR/t.qcow2 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3Dfile:TEST_DIR/t.qcow2 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file.filename=3Dfile:TEST_DIR/t.qcow2 QEMU_PROG: -drive file.filename=3Dfile:TEST_DIR/t.qcow2: Could not open 'f= ile:TEST_DIR/t.qcow2': No such file or directory @@ -353,78 +353,78 @@ wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddrive0 -snapshot QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1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D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Don,if=3Dnone,id=3Ddrive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B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ote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file.filename=3DTEST_DIR/t.qcow2,driver=3Dqcow2,snapshot= =3Don,if=3Dnone,id=3Ddrive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 =1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 = "=1B[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x22 0=1B[K=1B[D =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= Dqemu-io drive0 "write -P 0x22 0 =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file.filename=3DTEST_DIR/t.qcow2,driver=3Dqcow2,if=3Dnone,= id=3Ddrive0 -snapshot QEMU X.Y.Z monitor - type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1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3Dfile:TEST_DIR/t.qcow2,if=3Dnone,id=3Ddrive0 -snapsh= ot QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1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1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3Dfile:TEST_DIR/t.qcow2,snapshot=3Don,if=3Dnone,id=3D= drive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=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1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddrive0 -snapshot QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=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1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0=1B[K=1B[D =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= Dqemu-io drive0 "write -P 0x22 0 =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Don,if=3Dnone,id=3Ddrive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 =1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 = "=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io drive0 "w=1B[K=1B[D=1B[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[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= Dqemu-io drive0 "write -P 0x22 0 =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Doff,if=3Dnone,id=3Ddriv= e0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[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D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Don,if=3Dnone,id=3Ddrive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=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1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x33 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x33 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x33 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) c=1B[K=1B[Dco=1B[K=1B[D=1B[Dcom=1B[K=1B[D=1B[D=1B[Dcomm=1B[K=1B[D= =1B[D=1B[D=1B[Dcommi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dcommit=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dcommit =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit d=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit dr=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dcommit dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dcommit drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit drive0=1B[K -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) commit drive0 +(qemu) quit =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index c6f4eef..7f9a121 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -58,12 +58,12 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive file=3DTEST_DIR/t.qcow2,driver=3Dqcow2,backing.file.filena= me=3DTEST_DIR/t.qcow2.orig,if=3Dnone,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writeback Backing file: TEST_DIR/t.qcow2.orig (chain depth: 1) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,driver=3Draw,backing.file.filename= =3DTEST_DIR/t.qcow2.orig QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,driver=3Draw,backing.file.filena= me=3DTEST_DIR/t.qcow2.orig: Driver doesn't support backing files @@ -79,11 +79,11 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,file.backing.= driver=3Dqcow2,file.backing.f =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Don QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Doff QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3D QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3D= : Parameter 'lazy-refcounts' expects 'on' or 'off' @@ -103,23 +103,23 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,format=3Dqc= ow2,lazy-refcounts=3Don: Lazy ref =20 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Doff QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 =20 =3D=3D=3D No medium =3D=3D=3D =20 Testing: -drive if=3Dfloppy QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive if=3Dide,media=3Dcdrom QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive if=3Dscsi,media=3Dcdrom QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -drive if=3Dscsi,media=3Dcdrom: warning: bus=3D0,unit=3D= 0 is deprecated with this machine type -q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +quit =20 Testing: -drive if=3Dide QEMU X.Y.Z monitor - type 'help' for more information @@ -137,11 +137,11 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive if=3Dnone,id=3Ddisk -device ide-cd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scsi-cd,dri= ve=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive if=3Dnone,id=3Ddisk -device ide-drive,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information @@ -166,16 +166,16 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dfloppy,readonly=3Don QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dide,media=3Dcdrom,readonly=3D= on QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dscsi,media=3Dcdrom,readonly= =3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,if=3Dscsi,media=3Dcdrom,r= eadonly=3Don: warning: bus=3D0,unit=3D0 is deprecated with this machine type -q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dide,readonly=3Don QEMU X.Y.Z monitor - type 'help' for more information @@ -185,19 +185,19 @@ QEMU_PROG: Initialization of device ide-hd failed: De= vice initialization failed. Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dscsi,readonly=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,if=3Dscsi,readonly=3Don: = warning: bus=3D0,unit=3D0 is deprecated with this machine type -q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dvirtio,readonly=3Don QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-cd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device lsi53c895a -device scsi-cd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-drive,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information @@ -211,97 +211,97 @@ QEMU_PROG: -device ide-hd,drive=3Ddisk: Device initia= lization failed. =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device lsi53c895a -device scsi-disk,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device lsi53c895a -device scsi-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 =20 =3D=3D=3D Cache modes =3D=3D=3D =20 Testing: -drive driver=3Dnull-co,cache=3Dnone QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Ddirectsync QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dwriteback QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dwritethrough QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dunsafe QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive driver=3Dnull-co,cache=3Dinvalid_value QEMU_PROG: -drive driver=3Dnull-co,cache=3Dinvalid_value: invalid cache op= tion =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dwriteback,backing.file.fil= ename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-name= =3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,if= =3Dnone,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writeback Backing file: TEST_DIR/t.qcow2.base (chain depth: 1) -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block f=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block fi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block file=1B[K +(qemu) info block file =20 file: TEST_DIR/t.qcow2 (file) Cache mode: writeback -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K +(qemu) info block backing backing: TEST_DIR/t.qcow2.base (qcow2, read-only) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[Dinfo block backing-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-f= =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-fi=1B[K=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinf o block backing-fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= ing-file=1B[K +(qemu) info block backing-file =20 backing-file: TEST_DIR/t.qcow2.base (file, read-only) Cache mode: writeback, ignore flushes -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dwritethrough,backing.file.= filename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-n= ame=3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,i= f=3Dnone,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writethrough Backing file: TEST_DIR/t.qcow2.base (chain depth: 1) -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block f=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block fi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block file=1B[K +(qemu) info block file =20 file: TEST_DIR/t.qcow2 (file) Cache mode: writeback -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K +(qemu) info block backing backing: TEST_DIR/t.qcow2.base (qcow2, read-only) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[Dinfo block backing-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-f= =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-fi=1B[K=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinf o block backing-fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= ing-file=1B[K +(qemu) info block backing-file =20 backing-file: TEST_DIR/t.qcow2.base (file, read-only) Cache mode: writeback, ignore flushes -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dunsafe,backing.file.filena= me=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-name=3D= backing,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,if=3Dno= ne,id=3Ddrive0 -nodefaults QEMU X.Y.Z monitor - type 'help' for more information -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K +(qemu) info block drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) Removable device: not locked, tray closed Cache mode: writeback, ignore flushes Backing file: TEST_DIR/t.qcow2.base (chain depth: 1) -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block f=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block fi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block file=1B[K +(qemu) info block file =20 file: TEST_DIR/t.qcow2 (file) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K +(qemu) info block backing backing: TEST_DIR/t.qcow2.base (qcow2, read-only) Cache mode: writeback, ignore flushes -(qemu) i=1B[K=1B[Din=1B[K=1B[D=1B[Dinf=1B[K=1B[D=1B[D=1B[Dinfo=1B[K=1B[D= =1B[D=1B[D=1B[Dinfo =1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dinfo b=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dinfo bl=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo blo=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo bloc=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block b=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dinfo block ba=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dinfo block bac=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back=1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= i=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinfo block backin=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[Dinfo block backing-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-f= =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block backing-fi=1B[K=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dinf o block backing-fil=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dinfo block back= ing-file=1B[K +(qemu) info block backing-file =20 backing-file: TEST_DIR/t.qcow2.base (file, read-only) Cache mode: writeback, ignore flushes -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinvalid_value,backing.file= .filename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.node-= name=3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfile,= if=3Dnone,id=3Ddrive0 -nodefaults QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinvalid_value,backing.fi= le.filename=3DTEST_DIR/t.qcow2.base,backing.cache.no-flush=3Don,backing.nod= e-name=3Dbacking,backing.file.node-name=3Dbacking-file,file.node-name=3Dfil= e,if=3Dnone,id=3Ddrive0: invalid cache option @@ -311,7 +311,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinval= id_value,backing.file.filenam =20 Testing: -drive file=3DTEST_DIR/t.qcow2,file.driver=3Dfile QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 =20 =3D=3D=3D Leaving out required options =3D=3D=3D @@ -405,15 +405,15 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,throttling.= bps-total=3D-5: bps/iops/max va =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D1 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D1000000000000000 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,bps=3D1000000000000001 QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,bps=3D1000000000000001: bps/iops= /max values must be within [0, 1000000000000000] @@ -435,11 +435,11 @@ QEMU_PROG: -drive file.filename=3Dfoo:bar: Could not = open 'foo:bar': No such file =20 Testing: -hda file:TEST_DIR/t.qcow2 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3Dfile:TEST_DIR/t.qcow2 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file.filename=3Dfile:TEST_DIR/t.qcow2 QEMU_PROG: -drive file.filename=3Dfile:TEST_DIR/t.qcow2: Could not open 'f= ile:TEST_DIR/t.qcow2': No such file or directory @@ -451,78 +451,78 @@ wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddrive0 -snapshot QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D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D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Don,if=3Dnone,id=3Ddrive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D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1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0=1B[K=1B[D =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= Dqemu-io drive0 "write -P 0x22 0 =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file.filename=3DTEST_DIR/t.qcow2,driver=3Dqcow2,snapshot= =3Don,if=3Dnone,id=3Ddrive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 =1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 = "=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[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[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= Dqemu-io drive0 "write -P 0x22 0 =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file.filename=3DTEST_DIR/t.qcow2,driver=3Dqcow2,if=3Dnone,= id=3Ddrive0 -snapshot QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1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B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3Dfile:TEST_DIR/t.qcow2,if=3Dnone,id=3Ddrive0 -snapsh= ot QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D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B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3Dfile:TEST_DIR/t.qcow2,snapshot=3Don,if=3Dnone,id=3D= drive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[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emu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddrive0 -snapshot QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io dr=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dqemu-io driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 =1B[K=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1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B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0=1B[K=1B[D =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= Dqemu-io drive0 "write -P 0x22 0 =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Don,if=3Dn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[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Doff,if=3Dnone,id=3Ddriv= e0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K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io drive0 "write -P = 0x22 0 4=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x22 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x22 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Testing: -drive file=3DTEST_DIR/t.qcow2,snapshot=3Don,if=3Dnone,id=3Ddrive0 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqe=1B[K=1B[D=1B[Dqem=1B[K=1B[D=1B[D=1B[Dqemu=1B[K=1B[D= =1B[D=1B[D=1B[Dqemu-=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-i=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dqemu-io=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io =1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dqemu-io d=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D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B[D=1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x33 0 4k=1B[K=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dqemu-io drive0 "write -P 0x33 0 4k"=1B[K +(qemu) qemu-io drive0 "write -P 0x33 0 4k" wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -(qemu) c=1B[K=1B[Dco=1B[K=1B[D=1B[Dcom=1B[K=1B[D=1B[D=1B[Dcomm=1B[K=1B[D= =1B[D=1B[D=1B[Dcommi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dcommit=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dcommit =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit d=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit dr=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dcommit dri=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit driv=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dcommit drive=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit drive0=1B[K -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) commit drive0 +(qemu) quit =20 read 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/068 b/tests/qemu-iotests/068 index 68f6e82..9c1687d 100755 --- a/tests/qemu-iotests/068 +++ b/tests/qemu-iotests/068 @@ -62,11 +62,11 @@ esac # Give qemu some time to boot before saving the VM state bash -c 'sleep 1; echo -e "savevm 0\nquit"' |\ $QEMU $platform_parm -nographic -monitor stdio -serial none -hda "$TES= T_IMG" |\ - _filter_qemu + _filter_qemu | _filter_hmp # Now try to continue from that VM state (this should just work) echo quit |\ $QEMU $platform_parm -nographic -monitor stdio -serial none -hda "$TES= T_IMG" -loadvm 0 |\ - _filter_qemu + _filter_qemu | _filter_hmp =20 # success, all done echo "*** done" diff --git a/tests/qemu-iotests/068.out b/tests/qemu-iotests/068.out index 84f19b4..0fa5340 100644 --- a/tests/qemu-iotests/068.out +++ b/tests/qemu-iotests/068.out @@ -4,8 +4,8 @@ QA output created by 068 =20 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D131072 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) s=1B[K=1B[Dsa=1B[K=1B[D=1B[Dsav=1B[K=1B[D=1B[D=1B[Dsave=1B[K=1B[D= =1B[D=1B[D=1B[Dsavev=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dsavevm=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dsavevm =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dsavevm 0=1B[K -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) savevm 0 +(qemu) quit QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit *** done diff --git a/tests/qemu-iotests/130.out b/tests/qemu-iotests/130.out index ae95b50..93020c3 100644 --- a/tests/qemu-iotests/130.out +++ b/tests/qemu-iotests/130.out @@ -9,14 +9,14 @@ virtual size: 64M (67108864 bytes) =3D=3D=3D HMP commit =3D=3D=3D =20 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) c=1B[K=1B[Dco=1B[K=1B[D=1B[Dcom=1B[K=1B[D=1B[D=1B[Dcomm=1B[K=1B[D= =1B[D=1B[D=1B[Dcommi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dcommit=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dcommit =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit t=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit te=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dcommit tes=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit test=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dcommit testd=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit testdi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dcommit testdis=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit testdisk=1B[K +(qemu) commit testdisk (qemu)=20 image: TEST_DIR/t.IMGFMT file format: IMGFMT virtual size: 64M (67108864 bytes) Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 backing_file= =3DTEST_DIR/t.IMGFMT.orig backing_fmt=3Draw QEMU X.Y.Z monitor - type 'help' for more information -(qemu) c=1B[K=1B[Dco=1B[K=1B[D=1B[Dcom=1B[K=1B[D=1B[D=1B[Dcomm=1B[K=1B[D= =1B[D=1B[D=1B[Dcommi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[Dcommit=1B[K=1B[D=1B[D=1B[= D=1B[D=1B[D=1B[Dcommit =1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit t=1B[= K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit te=1B[K=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dcommit tes=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit test=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[= D=1B[D=1B[Dcommit testd=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[Dcommit testdi=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[Dcommit testdis=1B[K=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D= =1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[D=1B[Dcommit testdisk=1B[K +(qemu) commit testdisk (qemu)=20 image: TEST_DIR/t.IMGFMT file format: IMGFMT diff --git a/tests/qemu-iotests/142 b/tests/qemu-iotests/142 index 29c0606..9a5b713 100755 --- a/tests/qemu-iotests/142 +++ b/tests/qemu-iotests/142 @@ -62,7 +62,7 @@ function do_run_qemu() =20 function run_qemu() { - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu + do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_hmp } =20 size=3D128M diff --git a/tests/qemu-iotests/142.out b/tests/qemu-iotests/142.out index 600beca..3667e38 100644 --- a/tests/qemu-iotests/142.out +++ b/tests/qemu-iotests/142.out @@ -7,23 +7,23 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D13421= 7728 backing_file=3DTEST_DIR/ =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dnone QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Ddirectsync QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dwriteback QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dwritethrough QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dunsafe QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit =20 Testing: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinvalid_value QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,cache=3Dinvalid_value: invalid c= ache option diff --git a/tests/qemu-iotests/145 b/tests/qemu-iotests/145 index 1eca0e8..e6c6bc4 100755 --- a/tests/qemu-iotests/145 +++ b/tests/qemu-iotests/145 @@ -43,7 +43,8 @@ _supported_proto generic _supported_os Linux =20 _make_test_img 1M -echo quit | $QEMU -nographic -hda "$TEST_IMG" -incoming 'exec:true' -snaps= hot -serial none -monitor stdio | _filter_qemu +echo quit | $QEMU -nographic -hda "$TEST_IMG" -incoming 'exec:true' -snaps= hot -serial none -monitor stdio | + _filter_qemu | _filter_hmp =20 # success, all done echo "*** done" diff --git a/tests/qemu-iotests/145.out b/tests/qemu-iotests/145.out index 75b5c8a..9a90009 100644 --- a/tests/qemu-iotests/145.out +++ b/tests/qemu-iotests/145.out @@ -1,5 +1,5 @@ QA output created by 145 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1048576 QEMU X.Y.Z monitor - type 'help' for more information -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K +(qemu) quit *** done diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.f= ilter index c9a2d5c..e83885a 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -86,6 +86,13 @@ _filter_qmp() -e ' QMP_VERSION' } =20 +# readline makes HMP command strings so long that git complains +_filter_hmp() +{ + sed -e $'s/^\\((qemu) \\)\\?.*\e\\[D/\\1/g' \ + -e $'s/\e\\[K//g' +} + # replace block job offset _filter_block_job_offset() { diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu index 4278789..7a78a00 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -59,7 +59,7 @@ function _timed_wait_for() do if [ -z "${silent}" ]; then echo "${resp}" | _filter_testdir | _filter_qemu \ - | _filter_qemu_io | _filter_qmp + | _filter_qemu_io | _filter_qmp | _filter_hmp fi grep -q "${*}" < <(echo ${resp}) if [ $? -eq 0 ]; then @@ -217,7 +217,7 @@ function _cleanup_qemu() =20 if [ -n "${wait}" ]; then cat <&${QEMU_OUT[$i]} | _filter_testdir | _filter_qemu \ - | _filter_qemu_io | _filter_qmp + | _filter_qemu_io | _filter_qmp | _filte= r_hmp fi rm -f "${QEMU_FIFO_IN}_${i}" "${QEMU_FIFO_OUT}_${i}" eval "exec ${QEMU_IN[$i]}<&-" # close file descriptors --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493411939471171.3633026033059; Fri, 28 Apr 2017 13:38:59 -0700 (PDT) Received: from localhost ([::1]:38717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CfK-0005Uz-2p for importer@patchew.org; Fri, 28 Apr 2017 16:38:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cai-0001Zg-6D for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cae-0001Ad-Im for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55490) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cab-00018z-Cc; Fri, 28 Apr 2017 16:34:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4AF737FD61; Fri, 28 Apr 2017 20:34:04 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id E46299533F; Fri, 28 Apr 2017 20:34:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4AF737FD61 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4AF737FD61 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:16 +0200 Message-Id: <1493411622-5343-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 28 Apr 2017 20:34:04 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 08/34] qemu-iotests: Test postcopy migration 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Kevin Wolf Reviewed-by: Dr. David Alan Gilbert --- tests/qemu-iotests/181 | 119 +++++++++++++++++++++++++++++++++++++++++= ++++ tests/qemu-iotests/181.out | 38 +++++++++++++++ tests/qemu-iotests/group | 1 + 3 files changed, 158 insertions(+) create mode 100755 tests/qemu-iotests/181 create mode 100644 tests/qemu-iotests/181.out diff --git a/tests/qemu-iotests/181 b/tests/qemu-iotests/181 new file mode 100755 index 0000000..e969a2a --- /dev/null +++ b/tests/qemu-iotests/181 @@ -0,0 +1,119 @@ +#!/bin/bash +# +# Test postcopy live migration with shared storage +# +# Copyright (C) 2017 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# creator +owner=3Dkwolf@redhat.com + +seq=3D`basename $0` +echo "QA output created by $seq" + +here=3D`pwd` +status=3D1 # failure is the default! + +MIG_SOCKET=3D"${TEST_DIR}/migrate" + +_cleanup() +{ + rm -f "${MIG_SOCKET}" + _cleanup_test_img + _cleanup_qemu +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter +. ./common.qemu + +_supported_fmt generic +_supported_proto generic +_supported_os Linux + +size=3D64M +_make_test_img $size + +echo +echo =3D=3D=3D Starting VMs =3D=3D=3D +echo + +qemu_comm_method=3D"monitor" + +_launch_qemu \ + -drive file=3D"${TEST_IMG}",cache=3D${CACHEMODE},driver=3D$IMGFMT,id= =3Ddisk +src=3D$QEMU_HANDLE + +_launch_qemu \ + -drive file=3D"${TEST_IMG}",cache=3D${CACHEMODE},driver=3D$IMGFMT,id= =3Ddisk \ + -incoming "unix:${MIG_SOCKET}" +dest=3D$QEMU_HANDLE + +echo +echo =3D=3D=3D Write something on the source =3D=3D=3D +echo + +silent=3D +_send_qemu_cmd $src 'qemu-io disk "write -P 0x55 0 64k"' "(qemu)" +_send_qemu_cmd $src "" "ops/sec" +_send_qemu_cmd $src 'qemu-io disk "read -P 0x55 0 64k"' "(qemu)" +_send_qemu_cmd $src "" "ops/sec" + +echo +echo =3D=3D=3D Do postcopy migration to destination =3D=3D=3D +echo + +# Slow down migration so much that it definitely won't finish before we can +# switch to postcopy +silent=3Dyes +_send_qemu_cmd $src 'migrate_set_speed 4k' "(qemu)" +_send_qemu_cmd $src 'migrate_set_capability postcopy-ram on' "(qemu)" +_send_qemu_cmd $src "migrate -d unix:${MIG_SOCKET}" "(qemu)" +_send_qemu_cmd $src 'migrate_start_postcopy' "(qemu)" + +QEMU_COMM_TIMEOUT=3D1 qemu_cmd_repeat=3D10 silent=3Dyes \ + _send_qemu_cmd $src "info migrate" "completed\|failed" +silent=3Dyes _send_qemu_cmd $src "" "(qemu)" + +echo +echo =3D=3D=3D Do some I/O on the destination =3D=3D=3D +echo + +# It is important that we use the BlockBackend of the guest device here in= stead +# of the node name, which would create a new BlockBackend and not test whe= ther +# the guest has the necessary permissions to access the image now +silent=3D +_send_qemu_cmd $dest 'qemu-io disk "read -P 0x55 0 64k"' "(qemu)" +_send_qemu_cmd $dest "" "ops/sec" +_send_qemu_cmd $dest 'qemu-io disk "write -P 0x66 1M 64k"' "(qemu)" +_send_qemu_cmd $dest "" "ops/sec" + +echo +echo =3D=3D=3D Shut down and check image =3D=3D=3D +echo + +_send_qemu_cmd $src 'quit' "" +_send_qemu_cmd $dest 'quit' "" +wait=3D1 _cleanup_qemu + +_check_test_img + +# success, all done +echo "*** done" +rm -f $seq.full +status=3D0 diff --git a/tests/qemu-iotests/181.out b/tests/qemu-iotests/181.out new file mode 100644 index 0000000..6534ba2 --- /dev/null +++ b/tests/qemu-iotests/181.out @@ -0,0 +1,38 @@ +QA output created by 181 +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 + +=3D=3D=3D Starting VMs =3D=3D=3D + + +=3D=3D=3D Write something on the source =3D=3D=3D + +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) qemu-io disk "write -P 0x55 0 64k" +wrote 65536/65536 bytes at offset 0 +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu)=20 +(qemu) qemu-io disk "read -P 0x55 0 64k" +read 65536/65536 bytes at offset 0 +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +=3D=3D=3D Do postcopy migration to destination =3D=3D=3D + + +=3D=3D=3D Do some I/O on the destination =3D=3D=3D + +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) qemu-io disk "read -P 0x55 0 64k" +read 65536/65536 bytes at offset 0 +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu)=20 +(qemu) qemu-io disk "write -P 0x66 1M 64k" +wrote 65536/65536 bytes at offset 1048576 +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +=3D=3D=3D Shut down and check image =3D=3D=3D + +(qemu) quit +(qemu)=20 +(qemu) quit +No errors were found on the image. +*** done diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 43142dd..893962d 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -169,3 +169,4 @@ 174 auto 175 auto quick 176 rw auto backing +181 rw auto migration --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412228092410.23305428151207; Fri, 28 Apr 2017 13:43:48 -0700 (PDT) Received: from localhost ([::1]:38751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cjy-0001R7-Fz for importer@patchew.org; Fri, 28 Apr 2017 16:43:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cal-0001aq-31 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cak-0001C3-BO for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40648) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cae-0001AG-9U; Fri, 28 Apr 2017 16:34:08 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 413388E681; Fri, 28 Apr 2017 20:34:07 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id C190396518; Fri, 28 Apr 2017 20:34:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 413388E681 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 413388E681 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:17 +0200 Message-Id: <1493411622-5343-10-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Apr 2017 20:34:07 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 09/34] block: An empty filename counts as no filename 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Max Reitz Reproducer: $ ./qemu-img info '' qemu-img: ./block.c:1008: bdrv_open_driver: Assertion `!drv->bdrv_needs_filename || bs->filename[0]' failed. [1] 26105 abort (core dumped) ./qemu-img info '' This patch fixes this to be: $ ./qemu-img info '' qemu-img: Could not open '': The 'file' block driver requires a file name Cc: qemu-stable Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Kevin Wolf --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index ceaca44..7b557f3 100644 --- a/block.c +++ b/block.c @@ -1204,7 +1204,7 @@ static int bdrv_open_common(BlockDriverState *bs, Blo= ckBackend *file, filename =3D qdict_get_try_str(options, "filename"); } =20 - if (drv->bdrv_needs_filename && !filename) { + if (drv->bdrv_needs_filename && (!filename || !filename[0])) { error_setg(errp, "The '%s' block driver requires a file name", drv->format_name); ret =3D -EINVAL; --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149341208343437.20830176195523; Fri, 28 Apr 2017 13:41:23 -0700 (PDT) Received: from localhost ([::1]:38736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Che-0007XI-5J for importer@patchew.org; Fri, 28 Apr 2017 16:41:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cal-0001az-70 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cak-0001By-Ak for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36354) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cag-0001Ar-8m; Fri, 28 Apr 2017 16:34:10 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 41E87C21864C; Fri, 28 Apr 2017 20:34:09 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8C549533F; Fri, 28 Apr 2017 20:34:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 41E87C21864C Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 41E87C21864C From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:18 +0200 Message-Id: <1493411622-5343-11-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 28 Apr 2017 20:34:09 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 10/34] iotests/051: Add test for empty filename 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- tests/qemu-iotests/051 | 1 + tests/qemu-iotests/051.out | 3 +++ tests/qemu-iotests/051.pc.out | 3 +++ 3 files changed, 7 insertions(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 7c78a02..26c29de 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -232,6 +232,7 @@ echo =3D=3D=3D Leaving out required options =3D=3D=3D echo =20 run_qemu -drive driver=3Dfile +run_qemu -drive driver=3Dfile,filename=3D run_qemu -drive driver=3Dnbd run_qemu -drive driver=3Draw run_qemu -drive file.driver=3Dfile diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index 3b7b040..4d3b1ff 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -221,6 +221,9 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive driver=3Dfile QEMU_PROG: -drive driver=3Dfile: The 'file' block driver requires a file n= ame =20 +Testing: -drive driver=3Dfile,filename=3D +QEMU_PROG: -drive driver=3Dfile,filename=3D: The 'file' block driver requi= res a file name + Testing: -drive driver=3Dnbd QEMU_PROG: -drive driver=3Dnbd: NBD server address missing =20 diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 7f9a121..76d7205 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -319,6 +319,9 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive driver=3Dfile QEMU_PROG: -drive driver=3Dfile: The 'file' block driver requires a file n= ame =20 +Testing: -drive driver=3Dfile,filename=3D +QEMU_PROG: -drive driver=3Dfile,filename=3D: The 'file' block driver requi= res a file name + Testing: -drive driver=3Dnbd QEMU_PROG: -drive driver=3Dnbd: NBD server address missing =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493411943592160.179590680969; Fri, 28 Apr 2017 13:39:03 -0700 (PDT) Received: from localhost ([::1]:38718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CfO-0005Yv-8N for importer@patchew.org; Fri, 28 Apr 2017 16:39:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cal-0001bS-O5 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cak-0001CF-U6 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43926) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cai-0001BC-Pu; Fri, 28 Apr 2017 16:34:12 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEA14A8353; Fri, 28 Apr 2017 20:34:11 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id B877398244; Fri, 28 Apr 2017 20:34:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BEA14A8353 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BEA14A8353 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:19 +0200 Message-Id: <1493411622-5343-12-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 28 Apr 2017 20:34:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 11/34] qemu-iotests: Remove PERL_PROG and BC_PROG 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We test for the presence of perl and bc and save their path in the variables PERL_PROG and BC_PROG, but never actually make use of them. Remove the checks and assignments so qemu-iotests can run even when bc isn't installed. Reported-by: Yash Mankad Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- tests/qemu-iotests/common.config | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.c= onfig index c4b51b3..5ee00a1 100644 --- a/tests/qemu-iotests/common.config +++ b/tests/qemu-iotests/common.config @@ -75,18 +75,12 @@ _fatal() exit 1 } =20 -export PERL_PROG=3D"`set_prog_path perl`" -[ "$PERL_PROG" =3D "" ] && _fatal "perl not found" - export AWK_PROG=3D"`set_prog_path awk`" [ "$AWK_PROG" =3D "" ] && _fatal "awk not found" =20 export SED_PROG=3D"`set_prog_path sed`" [ "$SED_PROG" =3D "" ] && _fatal "sed not found" =20 -export BC_PROG=3D"`set_prog_path bc`" -[ "$BC_PROG" =3D "" ] && _fatal "bc not found" - export PS_ALL_FLAGS=3D"-ef" =20 if [ -z "$QEMU_PROG" ]; then --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412372907703.891541146428; Fri, 28 Apr 2017 13:46:12 -0700 (PDT) Received: from localhost ([::1]:38766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CmI-0003UF-Qv for importer@patchew.org; Fri, 28 Apr 2017 16:46:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cao-0001dA-1M for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Can-0001D1-AN for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7934) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cal-0001CC-D8; Fri, 28 Apr 2017 16:34:15 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 609FFC04F4C5; Fri, 28 Apr 2017 20:34:14 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D71A9533F; Fri, 28 Apr 2017 20:34:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 609FFC04F4C5 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 609FFC04F4C5 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:20 +0200 Message-Id: <1493411622-5343-13-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Apr 2017 20:34:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 12/34] qemu_iotests: Remove _readlink() 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It is unused. Suggested-by: Fam Zheng Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- tests/qemu-iotests/common.config | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.c= onfig index 5ee00a1..d1b45f5 100644 --- a/tests/qemu-iotests/common.config +++ b/tests/qemu-iotests/common.config @@ -217,23 +217,5 @@ fi =20 export SAMPLE_IMG_DIR =20 -_readlink() -{ - if [ $# -ne 1 ]; then - echo "Usage: _readlink filename" 1>&2 - exit 1 - fi - - perl -e "\$in=3D\"$1\";" -e ' - $lnk =3D readlink($in); - if ($lnk =3D~ m!^/.*!) { - print "$lnk\n"; - } - else { - chomp($dir =3D `dirname $in`); - print "$dir/$lnk\n"; - }' -} - # make sure this script returns success true --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412146530792.2106531228626; Fri, 28 Apr 2017 13:42:26 -0700 (PDT) Received: from localhost ([::1]:38739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cif-0008R0-5G for importer@patchew.org; Fri, 28 Apr 2017 16:42:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cas-0001iY-UO for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cas-0001GY-6R for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37168) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Can-0001Cu-9Y; Fri, 28 Apr 2017 16:34:17 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A9EF79363; Fri, 28 Apr 2017 20:34:16 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id D747C9533F; Fri, 28 Apr 2017 20:34:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3A9EF79363 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3A9EF79363 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:21 +0200 Message-Id: <1493411622-5343-14-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 28 Apr 2017 20:34:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 13/34] block: Remove NULL check in bdrv_co_flush 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fam Zheng Reported by Coverity. We already use bs in bdrv_inc_in_flight before checking for NULL. It is unnecessary as all callers pass non-NULL bs, so drop it. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index a32fd1d..80d6c62 100644 --- a/block/io.c +++ b/block/io.c @@ -2300,7 +2300,7 @@ int coroutine_fn bdrv_co_flush(BlockDriverState *bs) =20 bdrv_inc_in_flight(bs); =20 - if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs) || + if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs) || bdrv_is_sg(bs)) { goto early_exit; } --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412233384115.4937814879122; Fri, 28 Apr 2017 13:43:53 -0700 (PDT) Received: from localhost ([::1]:38752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Ck4-0001WE-2s for importer@patchew.org; Fri, 28 Apr 2017 16:43:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cat-0001jq-Va for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cat-0001H4-4F for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50678) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cap-0001E9-Lv; Fri, 28 Apr 2017 16:34:19 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9DB419FDDA; Fri, 28 Apr 2017 20:34:18 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id A980698244; Fri, 28 Apr 2017 20:34:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9DB419FDDA Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9DB419FDDA From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:22 +0200 Message-Id: <1493411622-5343-15-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 28 Apr 2017 20:34:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 14/34] iotests: Launch qemu-nbd with -e 42 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz There is no reason for the qemu-nbd server used for tests not to accept an arbitrary number of clients. In fact, test 181 will require it to accept two clients at the same time (and thus it fails before this patch). This patch updates common.rc to launch qemu-nbd with -e 42 which should be enough for all of our current and future tests. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 62529ee..9fd3130 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -171,7 +171,9 @@ _make_test_img() =20 # Start an NBD server on the image file, which is what we'll be talkin= g to if [ $IMGPROTO =3D "nbd" ]; then - eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT $TEST_IMG_= FILE >/dev/null &" + # Pass a sufficiently high number to -e that should be enough for = all + # tests + eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT -e 42 $TES= T_IMG_FILE >/dev/null &" sleep 1 # FIXME: qemu-nbd needs to be listening before we continue fi =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412540423749.9321745783152; Fri, 28 Apr 2017 13:49:00 -0700 (PDT) Received: from localhost ([::1]:38780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cp0-0005wq-Kw for importer@patchew.org; Fri, 28 Apr 2017 16:48:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cau-0001kg-PM for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cat-0001HL-Rb for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37260) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Car-0001Fk-Hc; Fri, 28 Apr 2017 16:34:21 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 73D017F7DB; Fri, 28 Apr 2017 20:34:20 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F6309535B; Fri, 28 Apr 2017 20:34:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 73D017F7DB Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 73D017F7DB From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:23 +0200 Message-Id: <1493411622-5343-16-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 28 Apr 2017 20:34:20 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 15/34] Issue a deprecation warning if the user specifies the "-hdachs" option. 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth If the user needs to specify the disk geometry, the corresponding parameters of the "-device ide-hd" option should be used instead. "-hdachs" is considered as deprecated and might be removed soon. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-options.hx | 4 ++-- vl.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 787b9c3..f68829f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -803,8 +803,8 @@ STEXI Force hard disk 0 physical geometry (1 <=3D @var{c} <=3D 16383, 1 <=3D @var{h} <=3D 16, 1 <=3D @var{s} <=3D 63) and optionally force the BIOS translation mode (@var{t}=3Dnone, lba or auto). Usually QEMU can guess -all those parameters. This option is useful for old MS-DOS disk -images. +all those parameters. This option is deprecated, please use +@code{-device ide-hd,cyls=3Dc,heads=3Dh,secs=3Ds,...} instead. ETEXI =20 DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, diff --git a/vl.c b/vl.c index f46e070..42d4bce 100644 --- a/vl.c +++ b/vl.c @@ -3231,6 +3231,8 @@ int main(int argc, char **argv, char **envp) } } } + error_report("'-hdachs' is deprecated, please use '-device" + " ide-hd,cyls=3Dc,heads=3Dh,secs=3Ds,...' ins= tead"); break; case QEMU_OPTION_numa: opts =3D qemu_opts_parse_noisily(qemu_find_opts("numa"), --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412099533385.54383664810337; Fri, 28 Apr 2017 13:41:39 -0700 (PDT) Received: from localhost ([::1]:38737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Chu-0007jX-2E for importer@patchew.org; Fri, 28 Apr 2017 16:41:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Caw-0001mc-Fk for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cav-0001I5-GU for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37294) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cat-0001Gn-AC; Fri, 28 Apr 2017 16:34:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 41B557F7DF; Fri, 28 Apr 2017 20:34:22 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6F5D9533F; Fri, 28 Apr 2017 20:34:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 41B557F7DF Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 41B557F7DF From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:24 +0200 Message-Id: <1493411622-5343-17-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 28 Apr 2017 20:34:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 16/34] iotests: Fix typo in 026 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Eric Blake s/refcout/refcount/ CC: qemu-trivial@nongnu.org Signed-off-by: Eric Blake Reviewed-by: Laurent Vivier Signed-off-by: Kevin Wolf --- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/026.out | 2 +- tests/qemu-iotests/026.out.nocache | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026 index f5a7f02..7fadfba 100755 --- a/tests/qemu-iotests/026 +++ b/tests/qemu-iotests/026 @@ -119,7 +119,7 @@ done =20 =20 echo -echo =3D=3D=3D Refcout table growth tests =3D=3D=3D +echo =3D=3D=3D Refcount table growth tests =3D=3D=3D echo CLUSTER_SIZE=3D512 =20 diff --git a/tests/qemu-iotests/026.out b/tests/qemu-iotests/026.out index 59b8f74..86a50a2 100644 --- a/tests/qemu-iotests/026.out +++ b/tests/qemu-iotests/026.out @@ -462,7 +462,7 @@ Event: cluster_alloc; errno: 28; imm: off; once: off; w= rite -b write failed: No space left on device No errors were found on the image. =20 -=3D=3D=3D Refcout table growth tests =3D=3D=3D +=3D=3D=3D Refcount table growth tests =3D=3D=3D =20 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1073741824 =20 diff --git a/tests/qemu-iotests/026.out.nocache b/tests/qemu-iotests/026.ou= t.nocache index b4aeebc..ea2e166 100644 --- a/tests/qemu-iotests/026.out.nocache +++ b/tests/qemu-iotests/026.out.nocache @@ -470,7 +470,7 @@ Event: cluster_alloc; errno: 28; imm: off; once: off; w= rite -b write failed: No space left on device No errors were found on the image. =20 -=3D=3D=3D Refcout table growth tests =3D=3D=3D +=3D=3D=3D Refcount table growth tests =3D=3D=3D =20 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1073741824=20 =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412552437739.7072903173604; Fri, 28 Apr 2017 13:49:12 -0700 (PDT) Received: from localhost ([::1]:38782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CpC-00065q-WC for importer@patchew.org; Fri, 28 Apr 2017 16:49:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cb3-0001u7-OC for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cb2-0001Ju-33 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44140) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cav-0001Hw-Sg; Fri, 28 Apr 2017 16:34:26 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D87BC7F4BF; Fri, 28 Apr 2017 20:34:24 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id B84049533F; Fri, 28 Apr 2017 20:34:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D87BC7F4BF Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D87BC7F4BF From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:25 +0200 Message-Id: <1493411622-5343-18-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 28 Apr 2017 20:34:25 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 17/34] iotests: 109: Filter out "len" of failed jobs 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fam Zheng Mirror calculates job len from current I/O progress: s->common.len =3D s->common.offset + (cnt + s->sectors_in_flight) * BDRV_SECTOR_SIZE; The final "len" of a failed mirror job in iotests 109 depends on the subtle timing of the completion of read and write issued in the first mirror iteration. The second iteration may or may not have run when the I/O error happens, resulting in non-deterministic output of the BLOCK_JOB_COMPLETED event text. Similar to what was done in a752e4786, filter out the field to make the test robust. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Tested-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/109 | 6 ++++-- tests/qemu-iotests/109.out | 20 ++++++++++---------- tests/qemu-iotests/common.filter | 6 ++++++ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109 index 6161633..3b496a3 100755 --- a/tests/qemu-iotests/109 +++ b/tests/qemu-iotests/109 @@ -81,7 +81,8 @@ for fmt in qcow qcow2 qed vdi vmdk vpc; do =20 # This first test should fail: The image format was probed, we may not # write an image header at the start of the image - run_qemu "$TEST_IMG" "$TEST_IMG.src" "" "BLOCK_JOB_ERROR" + run_qemu "$TEST_IMG" "$TEST_IMG.src" "" "BLOCK_JOB_ERROR" | + _filter_block_job_len $QEMU_IO -c 'read -P 0 0 64k' "$TEST_IMG" | _filter_qemu_io =20 =20 @@ -104,7 +105,8 @@ for sample_img in empty.bochs iotest-dirtylog-10G-4M.vh= dx parallels-v1 \ _make_test_img 64M bzcat "$SAMPLE_IMG_DIR/$sample_img.bz2" > "$TEST_IMG.src" =20 - run_qemu "$TEST_IMG" "$TEST_IMG.src" "" "BLOCK_JOB_ERROR" | _filter_bl= ock_job_offset + run_qemu "$TEST_IMG" "$TEST_IMG.src" "" "BLOCK_JOB_ERROR" | + _filter_block_job_offset | _filter_block_job_len $QEMU_IO -c 'read -P 0 0 64k' "$TEST_IMG" | _filter_qemu_io =20 run_qemu "$TEST_IMG" "$TEST_IMG.src" "'format': 'raw'," "BLOCK_JOB_REA= DY" diff --git a/tests/qemu-iotests/109.out b/tests/qemu-iotests/109.out index 55fe536..dc02f9e 100644 --- a/tests/qemu-iotests/109.out +++ b/tests/qemu-iotests/109.out @@ -10,7 +10,7 @@ Automatically detecting the format is dangerous for raw i= mages, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 65536, "offset": = 0, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -31,7 +31,7 @@ Automatically detecting the format is dangerous for raw i= mages, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 197120, "offset":= 512, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 51= 2, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -52,7 +52,7 @@ Automatically detecting the format is dangerous for raw i= mages, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 327680, "offset":= 262144, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 26= 2144, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -73,7 +73,7 @@ Automatically detecting the format is dangerous for raw i= mages, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 65536, "offset": = 0, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -94,7 +94,7 @@ Automatically detecting the format is dangerous for raw i= mages, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 65536, "offset": = 0, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -115,7 +115,7 @@ Automatically detecting the format is dangerous for raw= images, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 65536, "offset": = 0, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": 0,= "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -135,7 +135,7 @@ Automatically detecting the format is dangerous for raw= images, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 65536, "offset": = OFFSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -155,7 +155,7 @@ Automatically detecting the format is dangerous for raw= images, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 31457280, "offset= ": OFFSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"= }} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -175,7 +175,7 @@ Automatically detecting the format is dangerous for raw= images, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 327680, "offset":= OFFSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -195,7 +195,7 @@ Automatically detecting the format is dangerous for raw= images, write operations Specify the 'raw' format explicitly to remove the restrictions. {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_ERROR", "data": {"device": "src", "operation": "write", "actio= n": "report"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 65536, "offset": = OFFSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": LEN, "offset": OF= FSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} {"return": []} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.f= ilter index e83885a..f58548d 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -99,6 +99,12 @@ _filter_block_job_offset() sed -e 's/, "offset": [0-9]\+,/, "offset": OFFSET,/' } =20 +# replace block job len +_filter_block_job_len() +{ + sed -e 's/, "len": [0-9]\+,/, "len": LEN,/g' +} + # replace driver-specific options in the "Formatting..." line _filter_img_create() { --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412390603451.18210230866157; Fri, 28 Apr 2017 13:46:30 -0700 (PDT) Received: from localhost ([::1]:38769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cmb-0003hI-B1 for importer@patchew.org; Fri, 28 Apr 2017 16:46:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cb4-0001uJ-09 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cb3-0001K4-33 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49850) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cax-0001Ie-Nz; Fri, 28 Apr 2017 16:34:27 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A857C25BF74; Fri, 28 Apr 2017 20:34:26 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A6FB9533F; Fri, 28 Apr 2017 20:34:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A857C25BF74 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A857C25BF74 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:26 +0200 Message-Id: <1493411622-5343-19-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 28 Apr 2017 20:34:26 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 18/34] block: Do not unref bs->file on error in BD's open 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz The block layer takes care of removing the bs->file child if the block driver's bdrv_open()/bdrv_file_open() implementation fails. The block driver therefore does not need to do so, and indeed should not unless it sets bs->file to NULL afterwards -- because if this is not done, the bdrv_unref_child() in bdrv_open_inherit() will dereference the freed memory block at bs->file afterwards, which is not good. We can now decide whether to add a "bs->file =3D NULL;" after each of the offending bdrv_unref_child() invocations, or just drop them altogether. The latter is simpler, so let's do that. Cc: qemu-stable Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/blkdebug.c | 4 +--- block/blkreplay.c | 3 --- block/blkverify.c | 3 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 67e8024..cc4a146 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -389,14 +389,12 @@ static int blkdebug_open(BlockDriverState *bs, QDict = *options, int flags, } else if (align) { error_setg(errp, "Invalid alignment"); ret =3D -EINVAL; - goto fail_unref; + goto out; } =20 ret =3D 0; goto out; =20 -fail_unref: - bdrv_unref_child(bs, bs->file); out: if (ret < 0) { g_free(s->config_file); diff --git a/block/blkreplay.c b/block/blkreplay.c index e110211..6aa5fd4 100755 --- a/block/blkreplay.c +++ b/block/blkreplay.c @@ -37,9 +37,6 @@ static int blkreplay_open(BlockDriverState *bs, QDict *op= tions, int flags, =20 ret =3D 0; fail: - if (ret < 0) { - bdrv_unref_child(bs, bs->file); - } return ret; } =20 diff --git a/block/blkverify.c b/block/blkverify.c index 9a1e21c..af23281 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -142,9 +142,6 @@ static int blkverify_open(BlockDriverState *bs, QDict *= options, int flags, =20 ret =3D 0; fail: - if (ret < 0) { - bdrv_unref_child(bs, bs->file); - } qemu_opts_del(opts); return ret; } --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412704874346.9157654955326; Fri, 28 Apr 2017 13:51:44 -0700 (PDT) Received: from localhost ([::1]:38800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Crf-00082q-Eq for importer@patchew.org; Fri, 28 Apr 2017 16:51:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cb7-0001xX-AZ for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cb6-0001LA-Cz for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50032) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cb4-0001KB-01; Fri, 28 Apr 2017 16:34:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE6E226AC7D; Fri, 28 Apr 2017 20:34:32 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A84496519; Fri, 28 Apr 2017 20:34:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EE6E226AC7D Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EE6E226AC7D From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:27 +0200 Message-Id: <1493411622-5343-20-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 28 Apr 2017 20:34:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 19/34] block: fix alignment calculations in bdrv_co_do_zero_pwritev 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Denis V. Lunev" tail_padding_bytes is calculated wrong. F.e. for offset =3D 0 bytes =3D 2048 align =3D 512 we will have tail_padding_bytes =3D 512 which is definitely wrong. The patch fixes that arithmetics. Fortunately this problem is harmless, we will have 1 extra allocation and free thus there is no need to put this into stable. The problem is here from the very beginning. Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Fam Zheng Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 80d6c62..40bd94f 100644 --- a/block/io.c +++ b/block/io.c @@ -1444,7 +1444,7 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvC= hild *child, int ret =3D 0; =20 head_padding_bytes =3D offset & (align - 1); - tail_padding_bytes =3D align - ((offset + bytes) & (align - 1)); + tail_padding_bytes =3D (align - (offset + bytes)) & (align - 1); =20 =20 assert(flags & BDRV_REQ_ZERO_WRITE); --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412304755577.9764142657864; Fri, 28 Apr 2017 13:45:04 -0700 (PDT) Received: from localhost ([::1]:38758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4ClD-0002V3-C2 for importer@patchew.org; Fri, 28 Apr 2017 16:45:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbB-0001zc-SR for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbB-0001Mv-2k for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9351) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cb5-0001Kj-Qj; Fri, 28 Apr 2017 16:34:35 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C860540F15; Fri, 28 Apr 2017 20:34:34 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7267C96521; Fri, 28 Apr 2017 20:34:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C860540F15 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C860540F15 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:28 +0200 Message-Id: <1493411622-5343-21-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 28 Apr 2017 20:34:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 20/34] qemu-img/convert: Use @opts for one thing only 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz After storing the creation options for the new image into @opts, we fetch some things for our own information, like the backing file name, or whether to use encryption or preallocation. With the -n parameter, there will not be any creation options; this is not too bad because this just means that querying a NULL @opts will always return the default value. However, we also use @opts for the --object options. Therefore, @opts is not necessarily NULL if -n was specified; instead, it may contain those options. In practice, this probably does not cause any problems because there most likely is no object that supports any of the parameters we query here, but this is neither something we should rely on nor does this variable reuse make the code very nice to read. Therefore, just use a separate variable for the --object options. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-img.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index b94fc11..e0503ae 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2049,13 +2049,15 @@ static int img_convert(int argc, char **argv) case 'W': s.wr_in_order =3D false; break; - case OPTION_OBJECT: - opts =3D qemu_opts_parse_noisily(&qemu_object_opts, - optarg, true); - if (!opts) { + case OPTION_OBJECT: { + QemuOpts *object_opts; + object_opts =3D qemu_opts_parse_noisily(&qemu_object_opts, + optarg, true); + if (!object_opts) { goto fail_getopt; } break; + } case OPTION_IMAGE_OPTS: image_opts =3D true; break; --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412465596236.21159421362768; Fri, 28 Apr 2017 13:47:45 -0700 (PDT) Received: from localhost ([::1]:38774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cno-00052I-4o for importer@patchew.org; Fri, 28 Apr 2017 16:47:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbF-000217-2m for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbE-0001Pp-AH for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50168) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cb8-0001LV-1A; Fri, 28 Apr 2017 16:34:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EC47823E6F2; Fri, 28 Apr 2017 20:34:36 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47D7D9533F; Fri, 28 Apr 2017 20:34:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EC47823E6F2 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EC47823E6F2 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:29 +0200 Message-Id: <1493411622-5343-22-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 28 Apr 2017 20:34:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 21/34] qemu-img/convert: Move bs_n > 1 && -B check down 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz It does not make much sense to use a backing image for the target when you concatenate multiple images (because then there is no correspondence between the source images' backing files and the target's); but it was still possible to give one by using -o backing_file=3DX instead of -B X. Fix this by moving the check. (Also, change the error message because -B is not the only way to specify the backing file, evidently.) Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-img.c | 13 +++++++------ tests/qemu-iotests/122.out | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index e0503ae..7044884 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2089,12 +2089,6 @@ static int img_convert(int argc, char **argv) } =20 =20 - if (s.src_num > 1 && out_baseimg) { - error_report("-B makes no sense when concatenating multiple input " - "images"); - goto fail_getopt; - } - /* ret is still -EINVAL until here */ ret =3D bdrv_parse_cache_mode(src_cache, &src_flags, &src_writethrough= ); if (ret < 0) { @@ -2208,6 +2202,13 @@ static int img_convert(int argc, char **argv) } s.target_has_backing =3D (bool) out_baseimg; =20 + if (s.src_num > 1 && out_baseimg) { + error_report("Having a backing file for the target makes no sense = when " + "concatenating multiple input images"); + ret =3D -1; + goto out; + } + /* Check if compression is supported */ if (s.compressed) { bool encryption =3D diff --git a/tests/qemu-iotests/122.out b/tests/qemu-iotests/122.out index 98814de..9317d80 100644 --- a/tests/qemu-iotests/122.out +++ b/tests/qemu-iotests/122.out @@ -61,8 +61,8 @@ read 65536/65536 bytes at offset 4194304 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 65536/65536 bytes at offset 8388608 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -qemu-img: -B makes no sense when concatenating multiple input images -qemu-img: -B makes no sense when concatenating multiple input images +qemu-img: Having a backing file for the target makes no sense when concate= nating multiple input images +qemu-img: Having a backing file for the target makes no sense when concate= nating multiple input images =20 =3D=3D=3D Compression with misaligned allocations and image sizes =3D=3D= =3D =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412264264242.44005062981216; Fri, 28 Apr 2017 13:44:24 -0700 (PDT) Received: from localhost ([::1]:38753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CkY-0001wE-NP for importer@patchew.org; Fri, 28 Apr 2017 16:44:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbF-00021d-IP for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbE-0001Pu-Ay for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50662) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4Cb9-0001M7-PJ; Fri, 28 Apr 2017 16:34:39 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB3FE3DBF7; Fri, 28 Apr 2017 20:34:38 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AC5098240; Fri, 28 Apr 2017 20:34:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BB3FE3DBF7 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BB3FE3DBF7 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:30 +0200 Message-Id: <1493411622-5343-23-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 28 Apr 2017 20:34:38 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 22/34] qemu-img: Document backing options 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz The create and convert subcommands have shorthands to set the backing_file and, in the case of create, the backing_fmt options for the new image. However, they have not been documented so far, which is remedied by this patch. Reported-by: Eric Blake Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-img-cmds.hx | 8 ++++---- qemu-img.texi | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 8ac7822..bf4ce59 100644 --- a/qemu-img-cmds.hx +++ b/qemu-img-cmds.hx @@ -22,9 +22,9 @@ STEXI ETEXI =20 DEF("create", img_create, - "create [-q] [--object objectdef] [-f fmt] [-o options] filename [size= ]") + "create [-q] [--object objectdef] [-f fmt] [-b backing_file] [-F backi= ng_fmt] [-o options] filename [size]") STEXI -@item create [--object @var{objectdef}] [-q] [-f @var{fmt}] [-o @var{optio= ns}] @var{filename} [@var{size}] +@item create [--object @var{objectdef}] [-q] [-f @var{fmt}] [-b @var{backi= ng_file}] [-F @var{backing_fmt}] [-o @var{options}] @var{filename} [@var{si= ze}] ETEXI =20 DEF("commit", img_commit, @@ -40,9 +40,9 @@ STEXI ETEXI =20 DEF("convert", img_convert, - "convert [--object objectdef] [--image-opts] [-c] [-p] [-q] [-n] [-f f= mt] [-t cache] [-T src_cache] [-O output_fmt] [-o options] [-s snapshot_id_= or_name] [-l snapshot_param] [-S sparse_size] [-m num_coroutines] [-W] file= name [filename2 [...]] output_filename") + "convert [--object objectdef] [--image-opts] [-c] [-p] [-q] [-n] [-f f= mt] [-t cache] [-T src_cache] [-O output_fmt] [-B backing_file] [-o options= ] [-s snapshot_id_or_name] [-l snapshot_param] [-S sparse_size] [-m num_cor= outines] [-W] filename [filename2 [...]] output_filename") STEXI -@item convert [--object @var{objectdef}] [--image-opts] [-c] [-p] [-q] [-n= ] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_cache}] [-O @var{output_fmt}= ] [-o @var{options}] [-s @var{snapshot_id_or_name}] [-l @var{snapshot_param= }] [-S @var{sparse_size}] [-m @var{num_coroutines}] [-W] @var{filename} [@v= ar{filename2} [...]] @var{output_filename} +@item convert [--object @var{objectdef}] [--image-opts] [-c] [-p] [-q] [-n= ] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_cache}] [-O @var{output_fmt}= ] [-B @var{backing_file}] [-o @var{options}] [-s @var{snapshot_id_or_name}]= [-l @var{snapshot_param}] [-S @var{sparse_size}] [-m @var{num_coroutines}]= [-W] @var{filename} [@var{filename2} [...]] @var{output_filename} ETEXI =20 DEF("dd", img_dd, diff --git a/qemu-img.texi b/qemu-img.texi index c81db3e..8c573ae 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -224,7 +224,7 @@ If @code{-r} is specified, exit codes representing the = image state refer to the state after (the attempt at) repairing it. That is, a successful @code{-r = all} will yield the exit code 0, independently of the image state before. =20 -@item create [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}] +@item create [-f @var{fmt}] [-b @var{backing_file}] [-F @var{backing_fmt}]= [-o @var{options}] @var{filename} [@var{size}] =20 Create the new disk image @var{filename} of size @var{size} and format @var{fmt}. Depending on the file format, you can add one or more @var{opti= ons} @@ -302,7 +302,7 @@ Error on reading data =20 @end table =20 -@item convert [-c] [-p] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_= cache}] [-O @var{output_fmt}] [-o @var{options}] [-s @var{snapshot_id_or_na= me}] [-l @var{snapshot_param}] [-m @var{num_coroutines}] [-W] [-S @var{spar= se_size}] @var{filename} [@var{filename2} [...]] @var{output_filename} +@item convert [-c] [-p] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_= cache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}] [-= s @var{snapshot_id_or_name}] [-l @var{snapshot_param}] [-m @var{num_corouti= nes}] [-W] [-S @var{sparse_size}] @var{filename} [@var{filename2} [...]] @v= ar{output_filename} =20 Convert the disk image @var{filename} or a snapshot @var{snapshot_param}(@= var{snapshot_id_or_name} is deprecated) to disk image @var{output_filename} using format @var{output_fmt}. It can = be optionally compressed (@code{-c} --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412415462635.2086436408076; Fri, 28 Apr 2017 13:46:55 -0700 (PDT) Received: from localhost ([::1]:38770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cn0-000427-4i for importer@patchew.org; Fri, 28 Apr 2017 16:46:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbF-00021i-LU for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbE-0001Q3-Je for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41330) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbB-0001Mm-JG; Fri, 28 Apr 2017 16:34:41 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EB283F177; Fri, 28 Apr 2017 20:34:40 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DC3E96525; Fri, 28 Apr 2017 20:34:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8EB283F177 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8EB283F177 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:31 +0200 Message-Id: <1493411622-5343-24-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Apr 2017 20:34:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 23/34] block/vhdx: Make vhdx_create() always set errp 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz This patch makes vhdx_create() always set errp in case of an error. It also adds errp parameters to vhdx_create_bat() and vhdx_create_new_region_table() so we can pass on the error object generated by blk_truncate() as of a future commit. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Message-id: 20170328205129.15138-2-mreitz@redhat.com Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- block/vhdx.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 052a753..d25bcd9 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1586,7 +1586,7 @@ exit: static int vhdx_create_bat(BlockBackend *blk, BDRVVHDXState *s, uint64_t image_size, VHDXImageType type, bool use_zero_blocks, uint64_t file_offset, - uint32_t length) + uint32_t length, Error **errp) { int ret =3D 0; uint64_t data_file_offset; @@ -1609,14 +1609,19 @@ static int vhdx_create_bat(BlockBackend *blk, BDRVV= HDXState *s, * is the furthest thing we have written yet */ ret =3D blk_truncate(blk, data_file_offset); if (ret < 0) { + error_setg_errno(errp, -ret, + "Failed to resize the underlying file"); goto exit; } } else if (type =3D=3D VHDX_TYPE_FIXED) { ret =3D blk_truncate(blk, data_file_offset + image_size); if (ret < 0) { + error_setg_errno(errp, -ret, + "Failed to resize the underlying file"); goto exit; } } else { + error_setg(errp, "Unsupported image type"); ret =3D -ENOTSUP; goto exit; } @@ -1627,6 +1632,7 @@ static int vhdx_create_bat(BlockBackend *blk, BDRVVHD= XState *s, /* for a fixed file, the default BAT entry is not zero */ s->bat =3D g_try_malloc0(length); if (length && s->bat =3D=3D NULL) { + error_setg(errp, "Failed to allocate memory for the BAT"); ret =3D -ENOMEM; goto exit; } @@ -1646,6 +1652,7 @@ static int vhdx_create_bat(BlockBackend *blk, BDRVVHD= XState *s, } ret =3D blk_pwrite(blk, file_offset, s->bat, length, 0); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to write the BAT"); goto exit; } } @@ -1671,7 +1678,8 @@ static int vhdx_create_new_region_table(BlockBackend = *blk, uint32_t log_size, bool use_zero_blocks, VHDXImageType type, - uint64_t *metadata_offset) + uint64_t *metadata_offset, + Error **errp) { int ret =3D 0; uint32_t offset =3D 0; @@ -1740,7 +1748,7 @@ static int vhdx_create_new_region_table(BlockBackend = *blk, /* The region table gives us the data we need to create the BAT, * so do that now */ ret =3D vhdx_create_bat(blk, s, image_size, type, use_zero_blocks, - bat_file_offset, bat_length); + bat_file_offset, bat_length, errp); if (ret < 0) { goto exit; } @@ -1749,12 +1757,14 @@ static int vhdx_create_new_region_table(BlockBacken= d *blk, ret =3D blk_pwrite(blk, VHDX_REGION_TABLE_OFFSET, buffer, VHDX_HEADER_BLOCK_SIZE, 0); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to write first region table"); goto exit; } =20 ret =3D blk_pwrite(blk, VHDX_REGION_TABLE2_OFFSET, buffer, VHDX_HEADER_BLOCK_SIZE, 0); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to write second region table"= ); goto exit; } =20 @@ -1825,6 +1835,7 @@ static int vhdx_create(const char *filename, QemuOpts= *opts, Error **errp) ret =3D -ENOTSUP; goto exit; } else { + error_setg(errp, "Invalid subformat '%s'", type); ret =3D -EINVAL; goto exit; } @@ -1879,12 +1890,14 @@ static int vhdx_create(const char *filename, QemuOp= ts *opts, Error **errp) ret =3D blk_pwrite(blk, VHDX_FILE_ID_OFFSET, &signature, sizeof(signat= ure), 0); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to write file signature"); goto delete_and_exit; } if (creator) { ret =3D blk_pwrite(blk, VHDX_FILE_ID_OFFSET + sizeof(signature), creator, creator_items * sizeof(gunichar2), 0); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to write creator field"); goto delete_and_exit; } } @@ -1893,13 +1906,14 @@ static int vhdx_create(const char *filename, QemuOp= ts *opts, Error **errp) /* Creates (B),(C) */ ret =3D vhdx_create_new_headers(blk, image_size, log_size); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to write image headers"); goto delete_and_exit; } =20 /* Creates (D),(E),(G) explicitly. (F) created as by-product */ ret =3D vhdx_create_new_region_table(blk, image_size, block_size, 512, log_size, use_zero_blocks, image_ty= pe, - &metadata_offset); + &metadata_offset, errp); if (ret < 0) { goto delete_and_exit; } @@ -1908,6 +1922,7 @@ static int vhdx_create(const char *filename, QemuOpts= *opts, Error **errp) ret =3D vhdx_create_new_metadata(blk, image_size, block_size, 512, metadata_offset, image_type); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to initialize metadata"); goto delete_and_exit; } =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412988363760.3655134828884; Fri, 28 Apr 2017 13:56:28 -0700 (PDT) Received: from localhost ([::1]:38828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CwF-0003lb-0g for importer@patchew.org; Fri, 28 Apr 2017 16:56:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbO-00028q-LW for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbM-0001Ub-9W for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41402) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbD-0001Nt-GY; Fri, 28 Apr 2017 16:34:43 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66E287573B; Fri, 28 Apr 2017 20:34:42 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1013D96525; Fri, 28 Apr 2017 20:34:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 66E287573B Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 66E287573B From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:32 +0200 Message-Id: <1493411622-5343-25-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Apr 2017 20:34:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 24/34] block: Add errp to b{lk,drv}_truncate() 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz For one thing, this allows us to drop the error message generation from qemu-img.c and blockdev.c and instead have it unified in bdrv_truncate(). Signed-off-by: Max Reitz Message-id: 20170328205129.15138-3-mreitz@redhat.com Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- block.c | 16 ++++++++++++---- block/blkdebug.c | 2 +- block/block-backend.c | 5 +++-- block/commit.c | 5 +++-- block/crypto.c | 2 +- block/mirror.c | 2 +- block/parallels.c | 13 ++++++++----- block/qcow.c | 6 +++--- block/qcow2-refcount.c | 5 ++++- block/qcow2.c | 14 +++++++++----- block/qed.c | 2 +- block/raw-format.c | 2 +- block/vdi.c | 4 ++-- block/vhdx-log.c | 2 +- block/vhdx.c | 10 +++------- block/vmdk.c | 13 +++---------- block/vpc.c | 13 +++++++------ blockdev.c | 21 +-------------------- include/block/block.h | 2 +- include/sysemu/block-backend.h | 2 +- qemu-img.c | 17 ++++------------- qemu-io-cmds.c | 5 +++-- 22 files changed, 73 insertions(+), 90 deletions(-) diff --git a/block.c b/block.c index 7b557f3..6a1937e 100644 --- a/block.c +++ b/block.c @@ -3307,7 +3307,7 @@ exit: /** * Truncate file to 'offset' bytes (needed only for file protocols) */ -int bdrv_truncate(BdrvChild *child, int64_t offset) +int bdrv_truncate(BdrvChild *child, int64_t offset, Error **errp) { BlockDriverState *bs =3D child->bs; BlockDriver *drv =3D bs->drv; @@ -3315,12 +3315,18 @@ int bdrv_truncate(BdrvChild *child, int64_t offset) =20 assert(child->perm & BLK_PERM_RESIZE); =20 - if (!drv) + if (!drv) { + error_setg(errp, "No medium inserted"); return -ENOMEDIUM; - if (!drv->bdrv_truncate) + } + if (!drv->bdrv_truncate) { + error_setg(errp, "Image format driver does not support resize"); return -ENOTSUP; - if (bs->read_only) + } + if (bs->read_only) { + error_setg(errp, "Image is read-only"); return -EACCES; + } =20 ret =3D drv->bdrv_truncate(bs, offset); if (ret =3D=3D 0) { @@ -3328,6 +3334,8 @@ int bdrv_truncate(BdrvChild *child, int64_t offset) bdrv_dirty_bitmap_truncate(bs); bdrv_parent_cb_resize(bs); ++bs->write_gen; + } else { + error_setg_errno(errp, -ret, "Failed to resize image"); } return ret; } diff --git a/block/blkdebug.c b/block/blkdebug.c index cc4a146..9bd066e 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -661,7 +661,7 @@ static int64_t blkdebug_getlength(BlockDriverState *bs) =20 static int blkdebug_truncate(BlockDriverState *bs, int64_t offset) { - return bdrv_truncate(bs->file, offset); + return bdrv_truncate(bs->file, offset, NULL); } =20 static void blkdebug_refresh_filename(BlockDriverState *bs, QDict *options) diff --git a/block/block-backend.c b/block/block-backend.c index ae3d771..f5bf13e 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1746,13 +1746,14 @@ int blk_pwrite_compressed(BlockBackend *blk, int64_= t offset, const void *buf, BDRV_REQ_WRITE_COMPRESSED); } =20 -int blk_truncate(BlockBackend *blk, int64_t offset) +int blk_truncate(BlockBackend *blk, int64_t offset, Error **errp) { if (!blk_is_available(blk)) { + error_setg(errp, "No medium inserted"); return -ENOMEDIUM; } =20 - return bdrv_truncate(blk->root, offset); + return bdrv_truncate(blk->root, offset, errp); } =20 static void blk_pdiscard_entry(void *opaque) diff --git a/block/commit.c b/block/commit.c index 91d2c34..76a0d98 100644 --- a/block/commit.c +++ b/block/commit.c @@ -151,7 +151,7 @@ static void coroutine_fn commit_run(void *opaque) } =20 if (base_len < s->common.len) { - ret =3D blk_truncate(s->base, s->common.len); + ret =3D blk_truncate(s->base, s->common.len, NULL); if (ret) { goto out; } @@ -511,8 +511,9 @@ int bdrv_commit(BlockDriverState *bs) * grow the backing file image if possible. If not possible, * we must return an error */ if (length > backing_length) { - ret =3D blk_truncate(backing, length); + ret =3D blk_truncate(backing, length, &local_err); if (ret < 0) { + error_report_err(local_err); goto ro_cleanup; } } diff --git a/block/crypto.c b/block/crypto.c index 34549b2..7ad64b5 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -389,7 +389,7 @@ static int block_crypto_truncate(BlockDriverState *bs, = int64_t offset) =20 offset +=3D payload_offset; =20 - return bdrv_truncate(bs->file, offset); + return bdrv_truncate(bs->file, offset, NULL); } =20 static void block_crypto_close(BlockDriverState *bs) diff --git a/block/mirror.c b/block/mirror.c index 9f5eb69..e86f8f8 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -724,7 +724,7 @@ static void coroutine_fn mirror_run(void *opaque) } =20 if (s->bdev_length > base_length) { - ret =3D blk_truncate(s->target, s->bdev_length); + ret =3D blk_truncate(s->target, s->bdev_length, NULL); if (ret < 0) { goto immediate_exit; } diff --git a/block/parallels.c b/block/parallels.c index 90acf79..8be46a7 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -223,7 +223,8 @@ static int64_t allocate_clusters(BlockDriverState *bs, = int64_t sector_num, space << BDRV_SECTOR_BITS, 0); } else { ret =3D bdrv_truncate(bs->file, - (s->data_end + space) << BDRV_SECTOR_BITS); + (s->data_end + space) << BDRV_SECTOR_BITS, + NULL); } if (ret < 0) { return ret; @@ -456,8 +457,10 @@ static int parallels_check(BlockDriverState *bs, BdrvC= heckResult *res, size - res->image_end_offset); res->leaks +=3D count; if (fix & BDRV_FIX_LEAKS) { - ret =3D bdrv_truncate(bs->file, res->image_end_offset); + Error *local_err =3D NULL; + ret =3D bdrv_truncate(bs->file, res->image_end_offset, &local_= err); if (ret < 0) { + error_report_err(local_err); res->check_errors++; return ret; } @@ -504,7 +507,7 @@ static int parallels_create(const char *filename, QemuO= pts *opts, Error **errp) =20 blk_set_allow_write_beyond_eof(file, true); =20 - ret =3D blk_truncate(file, 0); + ret =3D blk_truncate(file, 0, errp); if (ret < 0) { goto exit; } @@ -696,7 +699,7 @@ static int parallels_open(BlockDriverState *bs, QDict *= options, int flags, } =20 if (!(flags & BDRV_O_RESIZE) || !bdrv_has_zero_init(bs->file->bs) || - bdrv_truncate(bs->file, bdrv_getlength(bs->file->bs)) !=3D 0) { + bdrv_truncate(bs->file, bdrv_getlength(bs->file->bs), NULL) != =3D 0) { s->prealloc_mode =3D PRL_PREALLOC_MODE_FALLOCATE; } =20 @@ -739,7 +742,7 @@ static void parallels_close(BlockDriverState *bs) } =20 if (bs->open_flags & BDRV_O_RDWR) { - bdrv_truncate(bs->file, s->data_end << BDRV_SECTOR_BITS); + bdrv_truncate(bs->file, s->data_end << BDRV_SECTOR_BITS, NULL); } =20 g_free(s->bat_dirty_bmap); diff --git a/block/qcow.c b/block/qcow.c index 9d6ac83..5d147b9 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -473,7 +473,7 @@ static uint64_t get_cluster_offset(BlockDriverState *bs, /* round to cluster size */ cluster_offset =3D (cluster_offset + s->cluster_size - 1) & ~(s->cluster_size - 1); - bdrv_truncate(bs->file, cluster_offset + s->cluster_size); + bdrv_truncate(bs->file, cluster_offset + s->cluster_size, = NULL); /* if encrypted, we must initialize the cluster content which won't be written */ if (bs->encrypted && @@ -833,7 +833,7 @@ static int qcow_create(const char *filename, QemuOpts *= opts, Error **errp) =20 blk_set_allow_write_beyond_eof(qcow_blk, true); =20 - ret =3D blk_truncate(qcow_blk, 0); + ret =3D blk_truncate(qcow_blk, 0, errp); if (ret < 0) { goto exit; } @@ -916,7 +916,7 @@ static int qcow_make_empty(BlockDriverState *bs) if (bdrv_pwrite_sync(bs->file, s->l1_table_offset, s->l1_table, l1_length) < 0) return -1; - ret =3D bdrv_truncate(bs->file, s->l1_table_offset + l1_length); + ret =3D bdrv_truncate(bs->file, s->l1_table_offset + l1_length, NULL); if (ret < 0) return ret; =20 diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 9e96f64..4efca7e 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -1728,14 +1728,17 @@ static int check_refblocks(BlockDriverState *bs, Bd= rvCheckResult *res, =20 if (fix & BDRV_FIX_ERRORS) { int64_t new_nb_clusters; + Error *local_err =3D NULL; =20 if (offset > INT64_MAX - s->cluster_size) { ret =3D -EINVAL; goto resize_fail; } =20 - ret =3D bdrv_truncate(bs->file, offset + s->cluster_size); + ret =3D bdrv_truncate(bs->file, offset + s->cluster_size, + &local_err); if (ret < 0) { + error_report_err(local_err); goto resize_fail; } size =3D bdrv_getlength(bs->file->bs); diff --git a/block/qcow2.c b/block/qcow2.c index 6a92d2e..845eee4 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2294,9 +2294,9 @@ static int qcow2_create2(const char *filename, int64_= t total_size, } =20 /* Okay, now that we have a valid image, let's give it the right size = */ - ret =3D blk_truncate(blk, total_size); + ret =3D blk_truncate(blk, total_size, errp); if (ret < 0) { - error_setg_errno(errp, -ret, "Could not resize image"); + error_prepend(errp, "Could not resize image: "); goto out; } =20 @@ -2584,7 +2584,7 @@ qcow2_co_pwritev_compressed(BlockDriverState *bs, uin= t64_t offset, /* align end of file to a sector boundary to ease reading with sector based I/Os */ cluster_offset =3D bdrv_getlength(bs->file->bs); - return bdrv_truncate(bs->file, cluster_offset); + return bdrv_truncate(bs->file, cluster_offset, NULL); } =20 buf =3D qemu_blockalign(bs, s->cluster_size); @@ -2674,6 +2674,7 @@ fail: static int make_completely_empty(BlockDriverState *bs) { BDRVQcow2State *s =3D bs->opaque; + Error *local_err =3D NULL; int ret, l1_clusters; int64_t offset; uint64_t *new_reftable =3D NULL; @@ -2798,8 +2799,10 @@ static int make_completely_empty(BlockDriverState *b= s) goto fail; } =20 - ret =3D bdrv_truncate(bs->file, (3 + l1_clusters) * s->cluster_size); + ret =3D bdrv_truncate(bs->file, (3 + l1_clusters) * s->cluster_size, + &local_err); if (ret < 0) { + error_report_err(local_err); goto fail; } =20 @@ -3273,9 +3276,10 @@ static int qcow2_amend_options(BlockDriverState *bs,= QemuOpts *opts, return ret; } =20 - ret =3D blk_truncate(blk, new_size); + ret =3D blk_truncate(blk, new_size, &local_err); blk_unref(blk); if (ret < 0) { + error_report_err(local_err); return ret; } } diff --git a/block/qed.c b/block/qed.c index 5ec7fd8..53199ac 100644 --- a/block/qed.c +++ b/block/qed.c @@ -635,7 +635,7 @@ static int qed_create(const char *filename, uint32_t cl= uster_size, blk_set_allow_write_beyond_eof(blk, true); =20 /* File must start empty and grow, check truncate is supported */ - ret =3D blk_truncate(blk, 0); + ret =3D blk_truncate(blk, 0, errp); if (ret < 0) { goto out; } diff --git a/block/raw-format.c b/block/raw-format.c index 86fbc65..a800733 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -341,7 +341,7 @@ static int raw_truncate(BlockDriverState *bs, int64_t o= ffset) =20 s->size =3D offset; offset +=3D s->offset; - return bdrv_truncate(bs->file, offset); + return bdrv_truncate(bs->file, offset, NULL); } =20 static int raw_media_changed(BlockDriverState *bs) diff --git a/block/vdi.c b/block/vdi.c index 9b4f70e..d12d9cd 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -832,9 +832,9 @@ static int vdi_create(const char *filename, QemuOpts *o= pts, Error **errp) } =20 if (image_type =3D=3D VDI_TYPE_STATIC) { - ret =3D blk_truncate(blk, offset + blocks * block_size); + ret =3D blk_truncate(blk, offset + blocks * block_size, errp); if (ret < 0) { - error_setg(errp, "Failed to statically allocate %s", filename); + error_prepend(errp, "Failed to statically allocate %s", filena= me); goto exit; } } diff --git a/block/vhdx-log.c b/block/vhdx-log.c index 67a91c0..3f4c2aa 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -548,7 +548,7 @@ static int vhdx_log_flush(BlockDriverState *bs, BDRVVHD= XState *s, if (new_file_size % (1024*1024)) { /* round up to nearest 1MB boundary */ new_file_size =3D ((new_file_size >> 20) + 1) << 20; - bdrv_truncate(bs->file, new_file_size); + bdrv_truncate(bs->file, new_file_size, NULL); } } qemu_vfree(desc_entries); diff --git a/block/vhdx.c b/block/vhdx.c index d25bcd9..e8fe3fb 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1171,7 +1171,7 @@ static int vhdx_allocate_block(BlockDriverState *bs, = BDRVVHDXState *s, /* per the spec, the address for a block is in units of 1MB */ *new_offset =3D ROUND_UP(*new_offset, 1024 * 1024); =20 - return bdrv_truncate(bs->file, *new_offset + s->block_size); + return bdrv_truncate(bs->file, *new_offset + s->block_size, NULL); } =20 /* @@ -1607,17 +1607,13 @@ static int vhdx_create_bat(BlockBackend *blk, BDRVV= HDXState *s, if (type =3D=3D VHDX_TYPE_DYNAMIC) { /* All zeroes, so we can just extend the file - the end of the BAT * is the furthest thing we have written yet */ - ret =3D blk_truncate(blk, data_file_offset); + ret =3D blk_truncate(blk, data_file_offset, errp); if (ret < 0) { - error_setg_errno(errp, -ret, - "Failed to resize the underlying file"); goto exit; } } else if (type =3D=3D VHDX_TYPE_FIXED) { - ret =3D blk_truncate(blk, data_file_offset + image_size); + ret =3D blk_truncate(blk, data_file_offset + image_size, errp); if (ret < 0) { - error_setg_errno(errp, -ret, - "Failed to resize the underlying file"); goto exit; } } else { diff --git a/block/vmdk.c b/block/vmdk.c index a9bd22b..c61b9cc 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1714,10 +1714,7 @@ static int vmdk_create_extent(const char *filename, = int64_t filesize, blk_set_allow_write_beyond_eof(blk, true); =20 if (flat) { - ret =3D blk_truncate(blk, filesize); - if (ret < 0) { - error_setg_errno(errp, -ret, "Could not truncate file"); - } + ret =3D blk_truncate(blk, filesize, errp); goto exit; } magic =3D cpu_to_be32(VMDK4_MAGIC); @@ -1780,9 +1777,8 @@ static int vmdk_create_extent(const char *filename, i= nt64_t filesize, goto exit; } =20 - ret =3D blk_truncate(blk, le64_to_cpu(header.grain_offset) << 9); + ret =3D blk_truncate(blk, le64_to_cpu(header.grain_offset) << 9, errp); if (ret < 0) { - error_setg_errno(errp, -ret, "Could not truncate file"); goto exit; } =20 @@ -2090,10 +2086,7 @@ static int vmdk_create(const char *filename, QemuOpt= s *opts, Error **errp) /* bdrv_pwrite write padding zeros to align to sector, we don't need t= hat * for description file */ if (desc_offset =3D=3D 0) { - ret =3D blk_truncate(new_blk, desc_len); - if (ret < 0) { - error_setg_errno(errp, -ret, "Could not truncate file"); - } + ret =3D blk_truncate(new_blk, desc_len, errp); } exit: if (new_blk) { diff --git a/block/vpc.c b/block/vpc.c index f591d4b..ecfee77 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -851,20 +851,21 @@ static int create_dynamic_disk(BlockBackend *blk, uin= t8_t *buf, } =20 static int create_fixed_disk(BlockBackend *blk, uint8_t *buf, - int64_t total_size) + int64_t total_size, Error **errp) { int ret; =20 /* Add footer to total size */ total_size +=3D HEADER_SIZE; =20 - ret =3D blk_truncate(blk, total_size); + ret =3D blk_truncate(blk, total_size, errp); if (ret < 0) { return ret; } =20 ret =3D blk_pwrite(blk, total_size - HEADER_SIZE, buf, HEADER_SIZE, 0); if (ret < 0) { + error_setg_errno(errp, -ret, "Unable to write VHD header"); return ret; } =20 @@ -996,11 +997,11 @@ static int vpc_create(const char *filename, QemuOpts = *opts, Error **errp) =20 if (disk_type =3D=3D VHD_DYNAMIC) { ret =3D create_dynamic_disk(blk, buf, total_sectors); + if (ret < 0) { + error_setg(errp, "Unable to create or write VHD header"); + } } else { - ret =3D create_fixed_disk(blk, buf, total_size); - } - if (ret < 0) { - error_setg(errp, "Unable to create or write VHD header"); + ret =3D create_fixed_disk(blk, buf, total_size, errp); } =20 out: diff --git a/blockdev.c b/blockdev.c index 6428206..4d8cded 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2930,26 +2930,7 @@ void qmp_block_resize(bool has_device, const char *d= evice, /* complete all in-flight operations before resizing the device */ bdrv_drain_all(); =20 - ret =3D blk_truncate(blk, size); - switch (ret) { - case 0: - break; - case -ENOMEDIUM: - error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM, device); - break; - case -ENOTSUP: - error_setg(errp, QERR_UNSUPPORTED); - break; - case -EACCES: - error_setg(errp, "Device '%s' is read only", device); - break; - case -EBUSY: - error_setg(errp, QERR_DEVICE_IN_USE, device); - break; - default: - error_setg_errno(errp, -ret, "Could not resize"); - break; - } + ret =3D blk_truncate(blk, size, errp); =20 out: blk_unref(blk); diff --git a/include/block/block.h b/include/block/block.h index 144df0d..862eb56 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -294,7 +294,7 @@ BlockDriverState *bdrv_find_backing_image(BlockDriverSt= ate *bs, const char *backing_file); int bdrv_get_backing_file_depth(BlockDriverState *bs); void bdrv_refresh_filename(BlockDriverState *bs); -int bdrv_truncate(BdrvChild *child, int64_t offset); +int bdrv_truncate(BdrvChild *child, int64_t offset, Error **errp); int64_t bdrv_nb_sectors(BlockDriverState *bs); int64_t bdrv_getlength(BlockDriverState *bs); int64_t bdrv_get_allocated_file_size(BlockDriverState *bs); diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 133e542..840ad61 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -225,7 +225,7 @@ int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk= , int64_t offset, int count, BdrvRequestFlags flags); int blk_pwrite_compressed(BlockBackend *blk, int64_t offset, const void *b= uf, int count); -int blk_truncate(BlockBackend *blk, int64_t offset); +int blk_truncate(BlockBackend *blk, int64_t offset, Error **errp); int blk_pdiscard(BlockBackend *blk, int64_t offset, int count); int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf, int64_t pos, int size); diff --git a/qemu-img.c b/qemu-img.c index 7044884..9eb8283 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3464,20 +3464,11 @@ static int img_resize(int argc, char **argv) goto out; } =20 - ret =3D blk_truncate(blk, total_size); - switch (ret) { - case 0: + ret =3D blk_truncate(blk, total_size, &err); + if (!ret) { qprintf(quiet, "Image resized.\n"); - break; - case -ENOTSUP: - error_report("This image does not support resize"); - break; - case -EACCES: - error_report("Image is read-only"); - break; - default: - error_report("Error resizing image: %s", strerror(-ret)); - break; + } else { + error_report_err(err); } out: blk_unref(blk); diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 312fc6d..21af9e6 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -1567,6 +1567,7 @@ static const cmdinfo_t flush_cmd =3D { =20 static int truncate_f(BlockBackend *blk, int argc, char **argv) { + Error *local_err =3D NULL; int64_t offset; int ret; =20 @@ -1576,9 +1577,9 @@ static int truncate_f(BlockBackend *blk, int argc, ch= ar **argv) return 0; } =20 - ret =3D blk_truncate(blk, offset); + ret =3D blk_truncate(blk, offset, &local_err); if (ret < 0) { - printf("truncate: %s\n", strerror(-ret)); + error_report_err(local_err); return 0; } =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412982437999.1589865256028; Fri, 28 Apr 2017 13:56:22 -0700 (PDT) Received: from localhost ([::1]:38827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cw9-0003gn-1Z for importer@patchew.org; Fri, 28 Apr 2017 16:56:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbO-00028M-4z for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbM-0001Uq-Dc for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37396) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbF-0001QL-Nc; Fri, 28 Apr 2017 16:34:45 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 723F3C00861F; Fri, 28 Apr 2017 20:34:44 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4AC69533F; Fri, 28 Apr 2017 20:34:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 723F3C00861F Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 723F3C00861F From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:33 +0200 Message-Id: <1493411622-5343-26-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 28 Apr 2017 20:34:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 25/34] block: Add errp to BD.bdrv_truncate() 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz Add an Error parameter to the block drivers' bdrv_truncate() interface. If a block driver does not set this in case of an error, the generic bdrv_truncate() implementation will do so. Where it is obvious, this patch also makes some block drivers set this value. Signed-off-by: Max Reitz Message-id: 20170328205129.15138-4-mreitz@redhat.com Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- block.c | 4 ++-- block/blkdebug.c | 4 ++-- block/crypto.c | 5 +++-- block/file-posix.c | 2 +- block/file-win32.c | 6 +++--- block/gluster.c | 3 ++- block/iscsi.c | 4 ++-- block/nfs.c | 2 +- block/qcow2.c | 8 ++++---- block/qed.c | 2 +- block/raw-format.c | 4 ++-- block/rbd.c | 2 +- block/sheepdog.c | 14 ++++++-------- include/block/block_int.h | 2 +- 14 files changed, 31 insertions(+), 31 deletions(-) diff --git a/block.c b/block.c index 6a1937e..ff232a2 100644 --- a/block.c +++ b/block.c @@ -3328,13 +3328,13 @@ int bdrv_truncate(BdrvChild *child, int64_t offset,= Error **errp) return -EACCES; } =20 - ret =3D drv->bdrv_truncate(bs, offset); + ret =3D drv->bdrv_truncate(bs, offset, errp); if (ret =3D=3D 0) { ret =3D refresh_total_sectors(bs, offset >> BDRV_SECTOR_BITS); bdrv_dirty_bitmap_truncate(bs); bdrv_parent_cb_resize(bs); ++bs->write_gen; - } else { + } else if (errp && !*errp) { error_setg_errno(errp, -ret, "Failed to resize image"); } return ret; diff --git a/block/blkdebug.c b/block/blkdebug.c index 9bd066e..d2a7561 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -659,9 +659,9 @@ static int64_t blkdebug_getlength(BlockDriverState *bs) return bdrv_getlength(bs->file->bs); } =20 -static int blkdebug_truncate(BlockDriverState *bs, int64_t offset) +static int blkdebug_truncate(BlockDriverState *bs, int64_t offset, Error *= *errp) { - return bdrv_truncate(bs->file, offset, NULL); + return bdrv_truncate(bs->file, offset, errp); } =20 static void blkdebug_refresh_filename(BlockDriverState *bs, QDict *options) diff --git a/block/crypto.c b/block/crypto.c index 7ad64b5..6828180 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -381,7 +381,8 @@ static int block_crypto_create_generic(QCryptoBlockForm= at format, return ret; } =20 -static int block_crypto_truncate(BlockDriverState *bs, int64_t offset) +static int block_crypto_truncate(BlockDriverState *bs, int64_t offset, + Error **errp) { BlockCrypto *crypto =3D bs->opaque; size_t payload_offset =3D @@ -389,7 +390,7 @@ static int block_crypto_truncate(BlockDriverState *bs, = int64_t offset) =20 offset +=3D payload_offset; =20 - return bdrv_truncate(bs->file, offset, NULL); + return bdrv_truncate(bs->file, offset, errp); } =20 static void block_crypto_close(BlockDriverState *bs) diff --git a/block/file-posix.c b/block/file-posix.c index ade71db..9c0d701 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1407,7 +1407,7 @@ static void raw_close(BlockDriverState *bs) } } =20 -static int raw_truncate(BlockDriverState *bs, int64_t offset) +static int raw_truncate(BlockDriverState *bs, int64_t offset, Error **errp) { BDRVRawState *s =3D bs->opaque; struct stat st; diff --git a/block/file-win32.c b/block/file-win32.c index e132ba1..7872e00 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -460,7 +460,7 @@ static void raw_close(BlockDriverState *bs) } } =20 -static int raw_truncate(BlockDriverState *bs, int64_t offset) +static int raw_truncate(BlockDriverState *bs, int64_t offset, Error **errp) { BDRVRawState *s =3D bs->opaque; LONG low, high; @@ -475,11 +475,11 @@ static int raw_truncate(BlockDriverState *bs, int64_t= offset) */ dwPtrLow =3D SetFilePointer(s->hfile, low, &high, FILE_BEGIN); if (dwPtrLow =3D=3D INVALID_SET_FILE_POINTER && GetLastError() !=3D NO= _ERROR) { - fprintf(stderr, "SetFilePointer error: %lu\n", GetLastError()); + error_setg_win32(errp, GetLastError(), "SetFilePointer error"); return -EIO; } if (SetEndOfFile(s->hfile) =3D=3D 0) { - fprintf(stderr, "SetEndOfFile error: %lu\n", GetLastError()); + error_setg_win32(errp, GetLastError(), "SetEndOfFile error"); return -EIO; } return 0; diff --git a/block/gluster.c b/block/gluster.c index cf29b5f..be45c08 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -1092,7 +1092,8 @@ static coroutine_fn int qemu_gluster_co_rw(BlockDrive= rState *bs, return acb.ret; } =20 -static int qemu_gluster_truncate(BlockDriverState *bs, int64_t offset) +static int qemu_gluster_truncate(BlockDriverState *bs, int64_t offset, + Error **errp) { int ret; BDRVGlusterState *s =3D bs->opaque; diff --git a/block/iscsi.c b/block/iscsi.c index 42fb0b0..1ef38cf 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -2059,7 +2059,7 @@ static void iscsi_reopen_commit(BDRVReopenState *reop= en_state) } } =20 -static int iscsi_truncate(BlockDriverState *bs, int64_t offset) +static int iscsi_truncate(BlockDriverState *bs, int64_t offset, Error **er= rp) { IscsiLun *iscsilun =3D bs->opaque; Error *local_err =3D NULL; @@ -2070,7 +2070,7 @@ static int iscsi_truncate(BlockDriverState *bs, int64= _t offset) =20 iscsi_readcapacity_sync(iscsilun, &local_err); if (local_err !=3D NULL) { - error_free(local_err); + error_propagate(errp, local_err); return -EIO; } =20 diff --git a/block/nfs.c b/block/nfs.c index 6541dec..5ae665a 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -764,7 +764,7 @@ static int64_t nfs_get_allocated_file_size(BlockDriverS= tate *bs) return (task.ret < 0 ? task.ret : st.st_blocks * 512); } =20 -static int nfs_file_truncate(BlockDriverState *bs, int64_t offset) +static int nfs_file_truncate(BlockDriverState *bs, int64_t offset, Error *= *errp) { NFSClient *client =3D bs->opaque; return nfs_ftruncate(client->context, client->fh, offset); diff --git a/block/qcow2.c b/block/qcow2.c index 845eee4..6c34798 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2525,26 +2525,26 @@ static coroutine_fn int qcow2_co_pdiscard(BlockDriv= erState *bs, return ret; } =20 -static int qcow2_truncate(BlockDriverState *bs, int64_t offset) +static int qcow2_truncate(BlockDriverState *bs, int64_t offset, Error **er= rp) { BDRVQcow2State *s =3D bs->opaque; int64_t new_l1_size; int ret; =20 if (offset & 511) { - error_report("The new size must be a multiple of 512"); + error_setg(errp, "The new size must be a multiple of 512"); return -EINVAL; } =20 /* cannot proceed if image has snapshots */ if (s->nb_snapshots) { - error_report("Can't resize an image which has snapshots"); + error_setg(errp, "Can't resize an image which has snapshots"); return -ENOTSUP; } =20 /* shrinking is currently not supported */ if (offset < bs->total_sectors * 512) { - error_report("qcow2 doesn't support shrinking images yet"); + error_setg(errp, "qcow2 doesn't support shrinking images yet"); return -ENOTSUP; } =20 diff --git a/block/qed.c b/block/qed.c index 53199ac..fa2aeee 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1518,7 +1518,7 @@ static int coroutine_fn bdrv_qed_co_pwrite_zeroes(Blo= ckDriverState *bs, return cb.ret; } =20 -static int bdrv_qed_truncate(BlockDriverState *bs, int64_t offset) +static int bdrv_qed_truncate(BlockDriverState *bs, int64_t offset, Error *= *errp) { BDRVQEDState *s =3D bs->opaque; uint64_t old_image_size; diff --git a/block/raw-format.c b/block/raw-format.c index a800733..9761bda 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -327,7 +327,7 @@ static void raw_refresh_limits(BlockDriverState *bs, Er= ror **errp) } } =20 -static int raw_truncate(BlockDriverState *bs, int64_t offset) +static int raw_truncate(BlockDriverState *bs, int64_t offset, Error **errp) { BDRVRawState *s =3D bs->opaque; =20 @@ -341,7 +341,7 @@ static int raw_truncate(BlockDriverState *bs, int64_t o= ffset) =20 s->size =3D offset; offset +=3D s->offset; - return bdrv_truncate(bs->file, offset, NULL); + return bdrv_truncate(bs->file, offset, errp); } =20 static int raw_media_changed(BlockDriverState *bs) diff --git a/block/rbd.c b/block/rbd.c index 6471f4f..3e6e73e 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -916,7 +916,7 @@ static int64_t qemu_rbd_getlength(BlockDriverState *bs) return info.size; } =20 -static int qemu_rbd_truncate(BlockDriverState *bs, int64_t offset) +static int qemu_rbd_truncate(BlockDriverState *bs, int64_t offset, Error *= *errp) { BDRVRBDState *s =3D bs->opaque; int r; diff --git a/block/sheepdog.c b/block/sheepdog.c index b2a5998..fe8fd92 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2159,9 +2159,8 @@ static int64_t sd_getlength(BlockDriverState *bs) return s->inode.vdi_size; } =20 -static int sd_truncate(BlockDriverState *bs, int64_t offset) +static int sd_truncate(BlockDriverState *bs, int64_t offset, Error **errp) { - Error *local_err =3D NULL; BDRVSheepdogState *s =3D bs->opaque; int ret, fd; unsigned int datalen; @@ -2169,16 +2168,15 @@ static int sd_truncate(BlockDriverState *bs, int64_= t offset) =20 max_vdi_size =3D (UINT64_C(1) << s->inode.block_size_shift) * MAX_DATA= _OBJS; if (offset < s->inode.vdi_size) { - error_report("shrinking is not supported"); + error_setg(errp, "shrinking is not supported"); return -EINVAL; } else if (offset > max_vdi_size) { - error_report("too big image size"); + error_setg(errp, "too big image size"); return -EINVAL; } =20 - fd =3D connect_to_sdog(s, &local_err); + fd =3D connect_to_sdog(s, errp); if (fd < 0) { - error_report_err(local_err); return fd; } =20 @@ -2191,7 +2189,7 @@ static int sd_truncate(BlockDriverState *bs, int64_t = offset) close(fd); =20 if (ret < 0) { - error_report("failed to update an inode."); + error_setg_errno(errp, -ret, "failed to update an inode"); } =20 return ret; @@ -2456,7 +2454,7 @@ static coroutine_fn int sd_co_writev(BlockDriverState= *bs, int64_t sector_num, BDRVSheepdogState *s =3D bs->opaque; =20 if (offset > s->inode.vdi_size) { - ret =3D sd_truncate(bs, offset); + ret =3D sd_truncate(bs, offset, NULL); if (ret < 0) { return ret; } diff --git a/include/block/block_int.h b/include/block/block_int.h index 4f8cd29..dcde90a 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -196,7 +196,7 @@ struct BlockDriver { int coroutine_fn (*bdrv_co_flush_to_os)(BlockDriverState *bs); =20 const char *protocol_name; - int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset); + int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset, Error **err= p); =20 int64_t (*bdrv_getlength)(BlockDriverState *bs); bool has_variable_length; --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412742216365.431878634686; Fri, 28 Apr 2017 13:52:22 -0700 (PDT) Received: from localhost ([::1]:38802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CsG-00006F-Rj for importer@patchew.org; Fri, 28 Apr 2017 16:52:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbN-00027u-Kq for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbM-0001Ul-CP for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44090) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbH-0001Rc-3c; Fri, 28 Apr 2017 16:34:47 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A07DD3C2B; Fri, 28 Apr 2017 20:34:46 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB50A96518; Fri, 28 Apr 2017 20:34:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1A07DD3C2B Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1A07DD3C2B From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:34 +0200 Message-Id: <1493411622-5343-27-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 28 Apr 2017 20:34:46 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 26/34] block: Add .bdrv_truncate() error messages 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz Add missing error messages for the block driver implementations of .bdrv_truncate(); drop the generic one from block.c's bdrv_truncate(). Since one of these changes touches a mis-indented block in block/file-posix.c, this patch fixes that coding style issue along the way. Signed-off-by: Max Reitz Message-id: 20170328205129.15138-5-mreitz@redhat.com Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- block.c | 2 -- block/file-posix.c | 17 ++++++++++++----- block/gluster.c | 4 +++- block/iscsi.c | 2 ++ block/nfs.c | 10 +++++++++- block/qcow2.c | 2 ++ block/qed.c | 4 +++- block/raw-format.c | 2 ++ block/rbd.c | 1 + 9 files changed, 34 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c index ff232a2..76bf00f 100644 --- a/block.c +++ b/block.c @@ -3334,8 +3334,6 @@ int bdrv_truncate(BdrvChild *child, int64_t offset, E= rror **errp) bdrv_dirty_bitmap_truncate(bs); bdrv_parent_cb_resize(bs); ++bs->write_gen; - } else if (errp && !*errp) { - error_setg_errno(errp, -ret, "Failed to resize image"); } return ret; } diff --git a/block/file-posix.c b/block/file-posix.c index 9c0d701..1941fb6 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1411,20 +1411,27 @@ static int raw_truncate(BlockDriverState *bs, int64= _t offset, Error **errp) { BDRVRawState *s =3D bs->opaque; struct stat st; + int ret; =20 if (fstat(s->fd, &st)) { - return -errno; + ret =3D -errno; + error_setg_errno(errp, -ret, "Failed to fstat() the file"); + return ret; } =20 if (S_ISREG(st.st_mode)) { if (ftruncate(s->fd, offset) < 0) { - return -errno; + ret =3D -errno; + error_setg_errno(errp, -ret, "Failed to resize the file"); + return ret; } } else if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) { - if (offset > raw_getlength(bs)) { - return -EINVAL; - } + if (offset > raw_getlength(bs)) { + error_setg(errp, "Cannot grow device files"); + return -EINVAL; + } } else { + error_setg(errp, "Resizing this file is not supported"); return -ENOTSUP; } =20 diff --git a/block/gluster.c b/block/gluster.c index be45c08..1d4e2f7 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -1100,7 +1100,9 @@ static int qemu_gluster_truncate(BlockDriverState *bs= , int64_t offset, =20 ret =3D glfs_ftruncate(s->fd, offset); if (ret < 0) { - return -errno; + ret =3D -errno; + error_setg_errno(errp, -ret, "Failed to truncate file"); + return ret; } =20 return 0; diff --git a/block/iscsi.c b/block/iscsi.c index 1ef38cf..5daa201 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -2065,6 +2065,7 @@ static int iscsi_truncate(BlockDriverState *bs, int64= _t offset, Error **errp) Error *local_err =3D NULL; =20 if (iscsilun->type !=3D TYPE_DISK) { + error_setg(errp, "Cannot resize non-disk iSCSI devices"); return -ENOTSUP; } =20 @@ -2075,6 +2076,7 @@ static int iscsi_truncate(BlockDriverState *bs, int64= _t offset, Error **errp) } =20 if (offset > iscsi_getlength(bs)) { + error_setg(errp, "Cannot grow iSCSI devices"); return -EINVAL; } =20 diff --git a/block/nfs.c b/block/nfs.c index 5ae665a..76572ae 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -767,7 +767,15 @@ static int64_t nfs_get_allocated_file_size(BlockDriver= State *bs) static int nfs_file_truncate(BlockDriverState *bs, int64_t offset, Error *= *errp) { NFSClient *client =3D bs->opaque; - return nfs_ftruncate(client->context, client->fh, offset); + int ret; + + ret =3D nfs_ftruncate(client->context, client->fh, offset); + if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to truncate file"); + return ret; + } + + return 0; } =20 /* Note that this will not re-establish a connection with the NFS server diff --git a/block/qcow2.c b/block/qcow2.c index 6c34798..4ca4cf0 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2551,6 +2551,7 @@ static int qcow2_truncate(BlockDriverState *bs, int64= _t offset, Error **errp) new_l1_size =3D size_to_l1(s, offset); ret =3D qcow2_grow_l1_table(bs, new_l1_size, true); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to grow the L1 table"); return ret; } =20 @@ -2559,6 +2560,7 @@ static int qcow2_truncate(BlockDriverState *bs, int64= _t offset, Error **errp) ret =3D bdrv_pwrite_sync(bs->file, offsetof(QCowHeader, size), &offset, sizeof(uint64_t)); if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to update the image size"); return ret; } =20 diff --git a/block/qed.c b/block/qed.c index fa2aeee..fd76817 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1526,11 +1526,12 @@ static int bdrv_qed_truncate(BlockDriverState *bs, = int64_t offset, Error **errp) =20 if (!qed_is_image_size_valid(offset, s->header.cluster_size, s->header.table_size)) { + error_setg(errp, "Invalid image size specified"); return -EINVAL; } =20 - /* Shrinking is currently not supported */ if ((uint64_t)offset < s->header.image_size) { + error_setg(errp, "Shrinking images is currently not supported"); return -ENOTSUP; } =20 @@ -1539,6 +1540,7 @@ static int bdrv_qed_truncate(BlockDriverState *bs, in= t64_t offset, Error **errp) ret =3D qed_write_header_sync(s); if (ret < 0) { s->header.image_size =3D old_image_size; + error_setg_errno(errp, -ret, "Failed to update the image size"); } return ret; } diff --git a/block/raw-format.c b/block/raw-format.c index 9761bda..36e6503 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -332,10 +332,12 @@ static int raw_truncate(BlockDriverState *bs, int64_t= offset, Error **errp) BDRVRawState *s =3D bs->opaque; =20 if (s->has_size) { + error_setg(errp, "Cannot resize fixed-size raw disks"); return -ENOTSUP; } =20 if (INT64_MAX - offset < s->offset) { + error_setg(errp, "Disk size too large for the chosen offset"); return -EINVAL; } =20 diff --git a/block/rbd.c b/block/rbd.c index 3e6e73e..fbf3059 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -923,6 +923,7 @@ static int qemu_rbd_truncate(BlockDriverState *bs, int6= 4_t offset, Error **errp) =20 r =3D rbd_resize(s->image, offset); if (r < 0) { + error_setg_errno(errp, -r, "Failed to resize file"); return r; } =20 --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412853929457.9371460703019; Fri, 28 Apr 2017 13:54:13 -0700 (PDT) Received: from localhost ([::1]:38815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cu4-0001uY-Lt for importer@patchew.org; Fri, 28 Apr 2017 16:54:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbN-00027s-Ib for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbM-0001Ug-Ab for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44138) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbJ-0001T9-4Z; Fri, 28 Apr 2017 16:34:49 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1072F68105; Fri, 28 Apr 2017 20:34:48 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E40E9533F; Fri, 28 Apr 2017 20:34:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1072F68105 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1072F68105 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:35 +0200 Message-Id: <1493411622-5343-28-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 28 Apr 2017 20:34:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 27/34] qcow2: Allow discard of final unaligned cluster 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Eric Blake As mentioned in commit 0c1bd46, we ignored requests to discard the trailing cluster of an unaligned image. While discard is an advisory operation from the guest standpoint, (and we are therefore free to ignore any request), our qcow2 implementation exploits the fact that a discarded cluster reads back as 0. As long as we discard on cluster boundaries, we are fine; but that means we could observe non-zero data leaked at the tail of an unaligned image. Enhance iotest 66 to cover this case, and fix the implementation to honor a discard request on the final partial cluster. Signed-off-by: Eric Blake Message-id: 20170407013709.18440-1-eblake@redhat.com Signed-off-by: Max Reitz --- block/qcow2.c | 7 ++++++- tests/qemu-iotests/066 | 12 +++++++----- tests/qemu-iotests/066.out | 12 ++++++++---- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 4ca4cf0..5c1573c 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2515,7 +2515,12 @@ static coroutine_fn int qcow2_co_pdiscard(BlockDrive= rState *bs, =20 if (!QEMU_IS_ALIGNED(offset | count, s->cluster_size)) { assert(count < s->cluster_size); - return -ENOTSUP; + /* Ignore partial clusters, except for the special case of the + * complete partial cluster at the end of an unaligned file */ + if (!QEMU_IS_ALIGNED(offset, s->cluster_size) || + offset + count !=3D bs->total_sectors * BDRV_SECTOR_SIZE) { + return -ENOTSUP; + } } =20 qemu_co_mutex_lock(&s->lock); diff --git a/tests/qemu-iotests/066 b/tests/qemu-iotests/066 index 364166d..c2116a3 100755 --- a/tests/qemu-iotests/066 +++ b/tests/qemu-iotests/066 @@ -42,16 +42,18 @@ _supported_fmt qcow2 _supported_proto generic _supported_os Linux =20 +# Intentionally create an unaligned image IMGOPTS=3D"compat=3D1.1" -IMG_SIZE=3D64M +IMG_SIZE=3D$((64 * 1024 * 1024 + 512)) =20 echo -echo "=3D=3D=3D Testing snapshotting an image with zero clusters =3D=3D=3D" +echo "=3D=3D=3D Testing cluster discards =3D=3D=3D" echo _make_test_img $IMG_SIZE -# Write some normal clusters, zero them (creating preallocated zero cluste= rs) -# and discard those -$QEMU_IO -c "write 0 256k" -c "write -z 0 256k" -c "discard 0 256k" "$TEST= _IMG" \ +# Write some normal clusters, zero some of them (creating preallocated +# zero clusters) and discard everything. Everything should now read as 0. +$QEMU_IO -c "write 0 256k" -c "write -z 0 256k" -c "write 64M 512" \ + -c "discard 0 $IMG_SIZE" -c "read -P 0 0 $IMG_SIZE" "$TEST_IMG" \ | _filter_qemu_io # Check the image (there shouldn't be any leaks) _check_test_img diff --git a/tests/qemu-iotests/066.out b/tests/qemu-iotests/066.out index 7bc9a10..7c1f31a 100644 --- a/tests/qemu-iotests/066.out +++ b/tests/qemu-iotests/066.out @@ -1,13 +1,17 @@ QA output created by 066 =20 -=3D=3D=3D Testing snapshotting an image with zero clusters =3D=3D=3D +=3D=3D=3D Testing cluster discards =3D=3D=3D =20 -Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67109376 wrote 262144/262144 bytes at offset 0 256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 262144/262144 bytes at offset 0 256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -discard 262144/262144 bytes at offset 0 -256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 512/512 bytes at offset 67108864 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +discard 67109376/67109376 bytes at offset 0 +64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 67109376/67109376 bytes at offset 0 +64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) No errors were found on the image. *** done --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412847055453.8890917601077; Fri, 28 Apr 2017 13:54:07 -0700 (PDT) Received: from localhost ([::1]:38814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Ctx-0001p6-BI for importer@patchew.org; Fri, 28 Apr 2017 16:54:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbO-00028m-LF for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbN-0001Vl-K9 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56890) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbL-0001U3-7m; Fri, 28 Apr 2017 16:34:51 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B36CC01C0F5; Fri, 28 Apr 2017 20:34:50 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85D979533F; Fri, 28 Apr 2017 20:34:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2B36CC01C0F5 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2B36CC01C0F5 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:36 +0200 Message-Id: <1493411622-5343-29-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Apr 2017 20:34:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 28/34] block: fix obvious coding style mistakes in block_int.h 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Klim Kireev Signed-off-by: Klim Kireev Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Max Reitz Message-id: 1491405505-31620-2-git-send-email-den@openvz.org Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- include/block/block_int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index dcde90a..8773940 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -252,7 +252,7 @@ struct BlockDriver { * Returns 0 for completed check, -errno for internal errors. * The check results are stored in result. */ - int (*bdrv_check)(BlockDriverState* bs, BdrvCheckResult *result, + int (*bdrv_check)(BlockDriverState *bs, BdrvCheckResult *result, BdrvCheckMode fix); =20 int (*bdrv_amend_options)(BlockDriverState *bs, QemuOpts *opts, @@ -454,13 +454,13 @@ struct BdrvChildRole { /* Returns a name that is supposedly more useful for human users than = the * node name for identifying the node in question (in particular, a BB * name), or NULL if the parent can't provide a better name. */ - const char* (*get_name)(BdrvChild *child); + const char *(*get_name)(BdrvChild *child); =20 /* Returns a malloced string that describes the parent of the child fo= r a * human reader. This could be a node-name, BlockBackend name, qdev ID= or * QOM path of the device owning the BlockBackend, job type and ID etc= . The * caller is responsible for freeing the memory. */ - char* (*get_parent_desc)(BdrvChild *child); + char *(*get_parent_desc)(BdrvChild *child); =20 /* * If this pair of functions is implemented, the parent doesn't issue = new --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412890233312.3728063980342; Fri, 28 Apr 2017 13:54:50 -0700 (PDT) Received: from localhost ([::1]:38816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cue-0002PD-U8 for importer@patchew.org; Fri, 28 Apr 2017 16:54:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbT-0002F8-BT for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbP-0001Xl-Dz for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:34:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56970) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbN-0001V4-9D; Fri, 28 Apr 2017 16:34:53 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 426CBC0528CC; Fri, 28 Apr 2017 20:34:52 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2C449533F; Fri, 28 Apr 2017 20:34:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 426CBC0528CC Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 426CBC0528CC From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:37 +0200 Message-Id: <1493411622-5343-30-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Apr 2017 20:34:52 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 29/34] block: assert no image modification under BDRV_O_INACTIVE 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Denis V. Lunev" As long as BDRV_O_INACTIVE is set, the image file is only opened so we have a file descriptor for it. We're definitely not supposed to modify the image, it's still owned by the migration source. This commit is an addition to 09e0c771 but the assert() is added to bdrv_truncate(). Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Max Reitz Message-id: 1491405505-31620-3-git-send-email-den@openvz.org Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index 76bf00f..6c6bb3e 100644 --- a/block.c +++ b/block.c @@ -3328,6 +3328,8 @@ int bdrv_truncate(BdrvChild *child, int64_t offset, E= rror **errp) return -EACCES; } =20 + assert(!(bs->open_flags & BDRV_O_INACTIVE)); + ret =3D drv->bdrv_truncate(bs, offset, errp); if (ret =3D=3D 0) { ret =3D refresh_total_sectors(bs, offset >> BDRV_SECTOR_BITS); --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493413102095109.653048675018; Fri, 28 Apr 2017 13:58:22 -0700 (PDT) Received: from localhost ([::1]:38843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cy4-0005Lk-Jm for importer@patchew.org; Fri, 28 Apr 2017 16:58:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbV-0002HF-BJ for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbU-0001cC-HX for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51736) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbP-0001Wu-9s; Fri, 28 Apr 2017 16:34:55 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3E790A0904; Fri, 28 Apr 2017 20:34:54 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0AF29535C; Fri, 28 Apr 2017 20:34:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3E790A0904 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3E790A0904 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:38 +0200 Message-Id: <1493411622-5343-31-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 28 Apr 2017 20:34:54 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 30/34] qemu-img: improve convert_iteration_sectors() 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy Do not do extra call to _get_block_status() Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20170407113404.9351-1-vsementsov@virtuozzo.com Reviewed-by: John Snow Signed-off-by: Max Reitz --- qemu-img.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 9eb8283..9b6e728 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1554,9 +1554,15 @@ static int convert_iteration_sectors(ImgConvertState= *s, int64_t sector_num) =20 if (s->sector_next_status <=3D sector_num) { BlockDriverState *file; - ret =3D bdrv_get_block_status(blk_bs(s->src[src_cur]), - sector_num - src_cur_offset, - n, &n, &file); + if (s->target_has_backing) { + ret =3D bdrv_get_block_status(blk_bs(s->src[src_cur]), + sector_num - src_cur_offset, + n, &n, &file); + } else { + ret =3D bdrv_get_block_status_above(blk_bs(s->src[src_cur]), N= ULL, + sector_num - src_cur_offset, + n, &n, &file); + } if (ret < 0) { return ret; } @@ -1565,26 +1571,8 @@ static int convert_iteration_sectors(ImgConvertState= *s, int64_t sector_num) s->status =3D BLK_ZERO; } else if (ret & BDRV_BLOCK_DATA) { s->status =3D BLK_DATA; - } else if (!s->target_has_backing) { - /* Without a target backing file we must copy over the content= s of - * the backing file as well. */ - /* Check block status of the backing file chain to avoid - * needlessly reading zeroes and limiting the iteration to the - * buffer size */ - ret =3D bdrv_get_block_status_above(blk_bs(s->src[src_cur]), N= ULL, - sector_num - src_cur_offset, - n, &n, &file); - if (ret < 0) { - return ret; - } - - if (ret & BDRV_BLOCK_ZERO) { - s->status =3D BLK_ZERO; - } else { - s->status =3D BLK_DATA; - } } else { - s->status =3D BLK_BACKING_FILE; + s->status =3D s->target_has_backing ? BLK_BACKING_FILE : BLK_D= ATA; } =20 s->sector_next_status =3D sector_num + n; --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493413021536335.5042130515999; Fri, 28 Apr 2017 13:57:01 -0700 (PDT) Received: from localhost ([::1]:38830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cwm-0004DD-4s for importer@patchew.org; Fri, 28 Apr 2017 16:57:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbV-0002Ho-Om for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbU-0001cf-PP for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51780) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbR-0001YU-17; Fri, 28 Apr 2017 16:34:57 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EC3CAA0900; Fri, 28 Apr 2017 20:34:55 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BE259533F; Fri, 28 Apr 2017 20:34:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EC3CAA0900 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EC3CAA0900 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:39 +0200 Message-Id: <1493411622-5343-32-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 28 Apr 2017 20:34:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 31/34] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Lidong Chen When the buffer is zero, blk_co_pwrite_zeroes is more effective than blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. This patch can reduce the time for converting qcow2 images with lots of zero data. Signed-off-by: Lidong Chen Message-id: 1493261907-18734-1-git-send-email-lidongchen@tencent.com Signed-off-by: Max Reitz --- qemu-img.c | 44 ++++++++++++++------------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 9b6e728..c719636 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1649,6 +1649,8 @@ static int coroutine_fn convert_co_write(ImgConvertSt= ate *s, int64_t sector_num, =20 while (nb_sectors > 0) { int n =3D nb_sectors; + BdrvRequestFlags flags =3D s->compressed ? BDRV_REQ_WRITE_COMPRESS= ED : 0; + switch (status) { case BLK_BACKING_FILE: /* If we have a backing file, leave clusters unallocated that = are @@ -1658,43 +1660,24 @@ static int coroutine_fn convert_co_write(ImgConvert= State *s, int64_t sector_num, break; =20 case BLK_DATA: - /* We must always write compressed clusters as a whole, so don= 't - * try to find zeroed parts in the buffer. We can only save the - * write if the buffer is completely zeroed and we're allowed = to - * keep the target sparse. */ - if (s->compressed) { - if (s->has_zero_init && s->min_sparse && - buffer_is_zero(buf, n * BDRV_SECTOR_SIZE)) - { - assert(!s->target_has_backing); - break; - } - - iov.iov_base =3D buf; - iov.iov_len =3D n << BDRV_SECTOR_BITS; - qemu_iovec_init_external(&qiov, &iov, 1); - - ret =3D blk_co_pwritev(s->target, sector_num << BDRV_SECTO= R_BITS, - n << BDRV_SECTOR_BITS, &qiov, - BDRV_REQ_WRITE_COMPRESSED); - if (ret < 0) { - return ret; - } - break; - } - - /* If there is real non-zero data or we're told to keep the ta= rget - * fully allocated (-S 0), we must write it. Otherwise we can = treat - * it as zero sectors. */ + /* If we're told to keep the target fully allocated (-S 0) or = there + * is real non-zero data, we must write it. Otherwise we can t= reat + * it as zero sectors. + * Compressed clusters need to be written as a whole, so in th= at + * case we can only save the write if the buffer is completely + * zeroed. */ if (!s->min_sparse || - is_allocated_sectors_min(buf, n, &n, s->min_sparse)) + (!s->compressed && + is_allocated_sectors_min(buf, n, &n, s->min_sparse)) || + (s->compressed && + !buffer_is_zero(buf, n * BDRV_SECTOR_SIZE))) { iov.iov_base =3D buf; iov.iov_len =3D n << BDRV_SECTOR_BITS; qemu_iovec_init_external(&qiov, &iov, 1); =20 ret =3D blk_co_pwritev(s->target, sector_num << BDRV_SECTO= R_BITS, - n << BDRV_SECTOR_BITS, &qiov, 0); + n << BDRV_SECTOR_BITS, &qiov, flags); if (ret < 0) { return ret; } @@ -1704,6 +1687,7 @@ static int coroutine_fn convert_co_write(ImgConvertSt= ate *s, int64_t sector_num, =20 case BLK_ZERO: if (s->has_zero_init) { + assert(!s->target_has_backing); break; } ret =3D blk_co_pwrite_zeroes(s->target, --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493412604494292.0648679927758; Fri, 28 Apr 2017 13:50:04 -0700 (PDT) Received: from localhost ([::1]:38783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cq2-0006kL-W8 for importer@patchew.org; Fri, 28 Apr 2017 16:50:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbV-0002Hg-Li for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbU-0001ck-W4 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44982) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbS-0001aF-RR; Fri, 28 Apr 2017 16:34:58 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C107370741; Fri, 28 Apr 2017 20:34:57 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FA779533F; Fri, 28 Apr 2017 20:34:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C107370741 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C107370741 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:40 +0200 Message-Id: <1493411622-5343-33-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 28 Apr 2017 20:34:57 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 32/34] iotests: clarify help text 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: John Snow Split the help text to highlight the groups of options a little better, carving out a clear "format" and "protocols" section. Signed-off-by: John Snow Message-id: 20170427205100.9505-2-jsnow@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-iotests/common | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index 9c6f972..fa8e69e 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -138,7 +138,7 @@ common options -v verbose -d debug =20 -check options +image format options -raw test raw (default) -bochs test bochs -cloop test cloop @@ -150,14 +150,18 @@ check options -vpc test vpc -vhdx test vhdx -vmdk test vmdk + -luks test luks + +image protocol options -file test file (default) -rbd test rbd -sheepdog test sheepdog -nbd test nbd -ssh test ssh -nfs test nfs - -luks test luks -vxhs test vxhs + +other options -xdiff graphical mode diff -nocache use O_DIRECT on backing file -misalign misalign memory allocations --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493413197973328.470216940207; Fri, 28 Apr 2017 13:59:57 -0700 (PDT) Received: from localhost ([::1]:38847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Czb-0006b7-Sd for importer@patchew.org; Fri, 28 Apr 2017 16:59:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CbX-0002Km-LW for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4CbW-0001gA-Sz for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45028) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbU-0001bw-RW; Fri, 28 Apr 2017 16:35:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF6BC70743; Fri, 28 Apr 2017 20:34:59 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43A069533F; Fri, 28 Apr 2017 20:34:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BF6BC70743 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BF6BC70743 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:41 +0200 Message-Id: <1493411622-5343-34-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 28 Apr 2017 20:34:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 33/34] iotests: fix exclusion option 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: John Snow If you are running out-of-tree, the -x option to exclude a certain iotest is broken. Replace porcelain usage of ls with a sturdier awk command. Reviewed-by: Fam Zheng Signed-off-by: John Snow Message-id: 20170427205100.9505-3-jsnow@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-iotests/common | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index fa8e69e..f2a7199 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -86,7 +86,8 @@ s/ .*//p elif $xgroup then # arg after -x - [ ! -s $tmp.list ] && ls [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] >$tm= p.list 2>/dev/null + # Populate $tmp.list with all tests + awk '/^[0-9]{3,}/ {print $1}' "${source_iotests}/group" > $tmp.lis= t 2>/dev/null group_list=3D`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0= -9][0-9][0-9].* $r /"'{ s/ .*//p }'` --=20 1.8.3.1 From nobody Thu Apr 25 15:59:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493413128263630.4080815264116; Fri, 28 Apr 2017 13:58:48 -0700 (PDT) Received: from localhost ([::1]:38844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4CyV-0005qs-2N for importer@patchew.org; Fri, 28 Apr 2017 16:58:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cbe-0002UI-JE for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cbd-0001m2-N1 for qemu-devel@nongnu.org; Fri, 28 Apr 2017 16:35:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51902) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4CbY-0001gJ-8P; Fri, 28 Apr 2017 16:35:04 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 370C7A0900; Fri, 28 Apr 2017 20:35:03 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-227.ams2.redhat.com [10.36.117.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DD389533F; Fri, 28 Apr 2017 20:35:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 370C7A0900 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 370C7A0900 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Apr 2017 22:33:42 +0200 Message-Id: <1493411622-5343-35-git-send-email-kwolf@redhat.com> In-Reply-To: <1493411622-5343-1-git-send-email-kwolf@redhat.com> References: <1493411622-5343-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 28 Apr 2017 20:35:03 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 34/34] progress: Show current progress on SIGINFO 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz Currently we only print progress information on retrieval of SIGUSR1. Some systems have a dedicated SIGINFO for this, however, so it should be handled appropriately if it is available. Buglink: https://bugs.launchpad.net/qemu/+bug/1662468 Signed-off-by: Max Reitz Message-id: 20170207235757.2026-1-mreitz@redhat.com Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- qemu-img.texi | 3 ++- util/qemu-progress.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qemu-img.texi b/qemu-img.texi index 8c573ae..50a2364 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -84,7 +84,8 @@ with or without a command shows help and lists the suppor= ted formats @item -p display progress bar (compare, convert and rebase commands only). If the @var{-p} option is not used for a command that supports it, the -progress is reported when the process receives a @code{SIGUSR1} signal. +progress is reported when the process receives a @code{SIGUSR1} or +@code{SIGINFO} signal. @item -q Quiet mode - do not print any output (except errors). There's no progress = bar in case both @var{-q} and @var{-p} options are used. diff --git a/util/qemu-progress.c b/util/qemu-progress.c index f745233..3c2223c 100644 --- a/util/qemu-progress.c +++ b/util/qemu-progress.c @@ -88,6 +88,9 @@ static void progress_dummy_init(void) action.sa_handler =3D sigusr_print; action.sa_flags =3D 0; sigaction(SIGUSR1, &action, NULL); +#ifdef SIGINFO + sigaction(SIGINFO, &action, NULL); +#endif =20 /* * SIGUSR1 is SIG_IPI and gets blocked in qemu_init_main_loop(). In the --=20 1.8.3.1