From nobody Tue Apr 8 16:39:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1625835971; cv=none; d=zohomail.com; s=zohoarc; b=ZCEiQG4youl+VEqVV33a1wS+5Kxlow4Icr9cCKXGNdPpM6kObYSCmRoWkBt7BUiRhMEwQAlH1crLKvbXqOc/q7BEGZETAeyprd2/fTgxR32NERpHpeFUrXJFVulMpE8Wp5hnfiuk/dFGEK1scbr91NxM7fqoa949V30Lbjb5MVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625835971; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jUs/4+OC+LOGBUI3Y7kkM9tGVxsNR6RX0Uf29J1Qjw4=; b=W4fD+46e5i4l/UGPVaBp3kAnf32Wyhkg7t0lsyL/q9S4ZecHHZRvQvVc42UUNnj3Fc/aJfTBaAzZN9Bunw3+AHpT2F09AsGP95e+3PSX4W3JkWGX0f/mGtnxLlWdhtjWeGgK+TRT5HBsjh5ZbAJOShTOfL8zX3SOh8mGOY0mcVI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625835971094928.1689104578224; Fri, 9 Jul 2021 06:06:11 -0700 (PDT) Received: from localhost ([::1]:53348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1qCn-0004wE-Vz for importer@patchew.org; Fri, 09 Jul 2021 09:06:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1pzY-0005uO-Oi for qemu-devel@nongnu.org; Fri, 09 Jul 2021 08:52:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42355) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1pzW-0003uW-Az for qemu-devel@nongnu.org; Fri, 09 Jul 2021 08:52:28 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-89-rYG673ZSMimgjdmFk_93lg-1; Fri, 09 Jul 2021 08:52: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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFB451084F54; Fri, 9 Jul 2021 12:52:22 +0000 (UTC) Received: from merkur.redhat.com (ovpn-113-203.ams2.redhat.com [10.36.113.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1029660843; Fri, 9 Jul 2021 12:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625835145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jUs/4+OC+LOGBUI3Y7kkM9tGVxsNR6RX0Uf29J1Qjw4=; b=XrUPq7W/sVvhu5NnZEvD3dexEdByPSgnBKrRWbtbUfWwqaU+AWjyfDQqoSWTtKt04u46Ti TpXMPpFr/9q7Pz+4k04EE6UYKfDy18UzStrrgTxkjNhdZuXHqzRvxyVQOTqGUF5TW35rK3 HeRL4uVLMPQrvm0zSCczVWoOeC4PJvk= X-MC-Unique: rYG673ZSMimgjdmFk_93lg-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 28/28] block: Make blockdev-reopen stable API Date: Fri, 9 Jul 2021 14:50:35 +0200 Message-Id: <20210709125035.191321-29-kwolf@redhat.com> In-Reply-To: <20210709125035.191321-1-kwolf@redhat.com> References: <20210709125035.191321-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.45, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1625835971755100001 Content-Type: text/plain; charset="utf-8" From: Alberto Garcia This patch drops the 'x-' prefix from x-blockdev-reopen. Signed-off-by: Alberto Garcia Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210708114709.206487-7-kwolf@redhat.com> Signed-off-by: Kevin Wolf --- qapi/block-core.json | 6 +++--- blockdev.c | 2 +- tests/qemu-iotests/155 | 2 +- tests/qemu-iotests/165 | 2 +- tests/qemu-iotests/245 | 10 +++++----- tests/qemu-iotests/248 | 2 +- tests/qemu-iotests/248.out | 2 +- tests/qemu-iotests/296 | 2 +- tests/qemu-iotests/298 | 2 +- tests/qemu-iotests/tests/remove-bitmap-from-backing | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 052520331e..c7a311798a 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -4219,7 +4219,7 @@ { 'command': 'blockdev-add', 'data': 'BlockdevOptions', 'boxed': true } =20 ## -# @x-blockdev-reopen: +# @blockdev-reopen: # # Reopens one or more block devices using the given set of options. # Any option not specified will be reset to its default value regardless @@ -4257,9 +4257,9 @@ # image does not have a default backing file name as part of its # metadata. # -# Since: 4.0 +# Since: 6.1 ## -{ 'command': 'x-blockdev-reopen', +{ 'command': 'blockdev-reopen', 'data': { 'options': ['BlockdevOptions'] } } =20 ## diff --git a/blockdev.c b/blockdev.c index 5ad0e9070e..3d8ac368a1 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3559,7 +3559,7 @@ fail: visit_free(v); } =20 -void qmp_x_blockdev_reopen(BlockdevOptionsList *reopen_list, Error **errp) +void qmp_blockdev_reopen(BlockdevOptionsList *reopen_list, Error **errp) { BlockReopenQueue *queue =3D NULL; GSList *drained =3D NULL; diff --git a/tests/qemu-iotests/155 b/tests/qemu-iotests/155 index 2947bfb81a..eadda52615 100755 --- a/tests/qemu-iotests/155 +++ b/tests/qemu-iotests/155 @@ -261,7 +261,7 @@ class TestBlockdevMirrorReopen(MirrorBaseClass): result =3D self.vm.qmp('blockdev-add', node_name=3D"backing", driver=3D"null-co") self.assert_qmp(result, 'return', {}) - result =3D self.vm.qmp('x-blockdev-reopen', options=3D[{ + result =3D self.vm.qmp('blockdev-reopen', options=3D[{ 'node-name': "target", 'driver': iotests.imgfmt, 'file': "target-file", diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165 index ef4cf14516..ce499946b8 100755 --- a/tests/qemu-iotests/165 +++ b/tests/qemu-iotests/165 @@ -137,7 +137,7 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase): assert sha256_1 =3D=3D self.getSha256() =20 # Reopen to RW - result =3D self.vm.qmp('x-blockdev-reopen', options=3D[{ + result =3D self.vm.qmp('blockdev-reopen', options=3D[{ 'node-name': 'node0', 'driver': iotests.imgfmt, 'file': { diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 8bc8101e6d..bf8261eec0 100755 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # group: rw # -# Test cases for the QMP 'x-blockdev-reopen' command +# Test cases for the QMP 'blockdev-reopen' command # # Copyright (C) 2018-2019 Igalia, S.L. # Author: Alberto Garcia @@ -85,16 +85,16 @@ class TestBlockdevReopen(iotests.QMPTestCase): "Expected output of %d qemu-io commands, found %d= " % (found, self.total_io_cmds)) =20 - # Run x-blockdev-reopen on a list of block devices + # Run blockdev-reopen on a list of block devices def reopenMultiple(self, opts, errmsg =3D None): - result =3D self.vm.qmp('x-blockdev-reopen', conv_keys=3DFalse, opt= ions=3Dopts) + result =3D self.vm.qmp('blockdev-reopen', conv_keys=3DFalse, optio= ns=3Dopts) if errmsg: self.assert_qmp(result, 'error/class', 'GenericError') self.assert_qmp(result, 'error/desc', errmsg) else: self.assert_qmp(result, 'return', {}) =20 - # Run x-blockdev-reopen on a single block device (specified by + # Run blockdev-reopen on a single block device (specified by # 'opts') but applying 'newopts' on top of it. The original 'opts' # dict is unmodified def reopen(self, opts, newopts =3D {}, errmsg =3D None): @@ -161,7 +161,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): self.reopen(opts, {'file.locking': 'off'}, "Cannot change the opti= on 'locking'") self.reopen(opts, {'file.filename': None}, "Invalid parameter type= for 'options[0].file.filename', expected: string") =20 - # node-name is optional in BlockdevOptions, but x-blockdev-reopen = needs it + # node-name is optional in BlockdevOptions, but blockdev-reopen ne= eds it del opts['node-name'] self.reopen(opts, {}, "node-name not specified") =20 diff --git a/tests/qemu-iotests/248 b/tests/qemu-iotests/248 index 03911333c4..2ec2416e8a 100755 --- a/tests/qemu-iotests/248 +++ b/tests/qemu-iotests/248 @@ -62,7 +62,7 @@ vm.event_wait('JOB_STATUS_CHANGE', timeout=3D3.0, vm.get_qmp_events() =20 del blockdev_opts['file']['size'] -vm.qmp_log('x-blockdev-reopen', filters=3D[filter_qmp_testfiles], +vm.qmp_log('blockdev-reopen', filters=3D[filter_qmp_testfiles], options =3D [ blockdev_opts ]) =20 vm.qmp_log('block-job-resume', device=3D'drive0') diff --git a/tests/qemu-iotests/248.out b/tests/qemu-iotests/248.out index 893f625347..66e94ccd7e 100644 --- a/tests/qemu-iotests/248.out +++ b/tests/qemu-iotests/248.out @@ -2,7 +2,7 @@ {"return": {}} {"execute": "blockdev-mirror", "arguments": {"device": "drive0", "on-targe= t-error": "enospc", "sync": "full", "target": "target"}} {"return": {}} -{"execute": "x-blockdev-reopen", "arguments": {"options": [{"driver": "qco= w2", "file": {"driver": "raw", "file": {"driver": "file", "filename": "TEST= _DIR/PID-target"}}, "node-name": "target"}]}} +{"execute": "blockdev-reopen", "arguments": {"options": [{"driver": "qcow2= ", "file": {"driver": "raw", "file": {"driver": "file", "filename": "TEST_D= IR/PID-target"}}, "node-name": "target"}]}} {"return": {}} {"execute": "block-job-resume", "arguments": {"device": "drive0"}} {"return": {}} diff --git a/tests/qemu-iotests/296 b/tests/qemu-iotests/296 index fa07b98bb4..099a3eeaa5 100755 --- a/tests/qemu-iotests/296 +++ b/tests/qemu-iotests/296 @@ -118,7 +118,7 @@ class EncryptionSetupTestCase(iotests.QMPTestCase): def openImageQmp(self, vm, id, file, secret, readOnly =3D False, reOpen =3D False): =20 - command =3D 'x-blockdev-reopen' if reOpen else 'blockdev-add' + command =3D 'blockdev-reopen' if reOpen else 'blockdev-add' =20 opts =3D { 'driver': iotests.imgfmt, diff --git a/tests/qemu-iotests/298 b/tests/qemu-iotests/298 index a5b0d91224..fae72211b1 100755 --- a/tests/qemu-iotests/298 +++ b/tests/qemu-iotests/298 @@ -98,7 +98,7 @@ class TestPreallocateFilter(TestPreallocateBase): self.check_big() =20 def test_reopen_opts(self): - result =3D self.vm.qmp('x-blockdev-reopen', options=3D[{ + result =3D self.vm.qmp('blockdev-reopen', options=3D[{ 'node-name': 'disk', 'driver': iotests.imgfmt, 'file': { diff --git a/tests/qemu-iotests/tests/remove-bitmap-from-backing b/tests/qe= mu-iotests/tests/remove-bitmap-from-backing index 0b07f7e836..8d48fc0f3c 100755 --- a/tests/qemu-iotests/tests/remove-bitmap-from-backing +++ b/tests/qemu-iotests/tests/remove-bitmap-from-backing @@ -53,7 +53,7 @@ new_base_opts =3D { } =20 # Don't want to bother with filtering qmp_log for reopen command -result =3D vm.qmp('x-blockdev-reopen', **new_base_opts) +result =3D vm.qmp('blockdev-reopen', **new_base_opts) if result !=3D {'return': {}}: log('Failed to reopen: ' + str(result)) =20 @@ -61,7 +61,7 @@ log('Remove persistent bitmap from base node reopened to = RW:') vm.qmp_log('block-dirty-bitmap-remove', node=3D'base', name=3D'bitmap0') =20 new_base_opts['options'][0]['read-only'] =3D True -result =3D vm.qmp('x-blockdev-reopen', **new_base_opts) +result =3D vm.qmp('blockdev-reopen', **new_base_opts) if result !=3D {'return': {}}: log('Failed to reopen: ' + str(result)) =20 --=20 2.31.1