From nobody Wed Nov 19 13:40:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1616003210; cv=none; d=zohomail.com; s=zohoarc; b=iVBz3evUsxbuSCu2ZxVUYdZ8E1fIc6xhBgSvugpsUYTDOSf9wahBW12D4i1DYj/GvoT+Rqi+sEgaQ/A0UvG9KiuYkWmHmjRFN8deu6DZxQGJuIYa+sfge9MAsNwGmMLSdR1YbkeeMY3k95wqLSwVSNYd8KQsNsaioNpsMV0np7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616003210; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3JUrd5uPT4K09azhBJNt0PcrPn/Tc4vTPIAbZ1Npi3w=; b=JIHUVcqD6jzuvZQzWKdKu21JS3UpT+qpS2MhhU4zlKETS8a9f/aUke5hP1pIy2X9WW31upu49w6qLtJVxtobumj1fqxkiXYFUpEwCmhJu+DVixyF9JPLxs6NgmRSESOQ+f9JuCpHBw5JUdBbdWjMEmcjn3VxPSRKt3LpBb5pLJg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616003210786603.7787583937516; Wed, 17 Mar 2021 10:46:50 -0700 (PDT) Received: from localhost ([::1]:59528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMaFt-0003rC-Hd for importer@patchew.org; Wed, 17 Mar 2021 13:46:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMZmk-0003df-KO; Wed, 17 Mar 2021 13:16:42 -0400 Received: from fanzine.igalia.com ([178.60.130.6]:38053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMZmg-0006rV-Pw; Wed, 17 Mar 2021 13:16:42 -0400 Received: from [213.94.25.37] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1lMZmd-0003v2-OV; Wed, 17 Mar 2021 18:16:35 +0100 Received: from berto by perseus.local with local (Exim 4.92) (envelope-from ) id 1lMZmQ-0007Ri-GM; Wed, 17 Mar 2021 18:16:22 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=3JUrd5uPT4K09azhBJNt0PcrPn/Tc4vTPIAbZ1Npi3w=; b=W02/EYvQYik50MjmsbN0KjpZo+Paq+vReO8lQkA4r+XfAuXZYWdeyHl2LTf+fM2ewHyuAYccxSKt16UDs1fjMn/f3iaF6V1/bIN2gUkKWin1TgiRw9LC1G5qIeC5Mdbdeg2HBYMuFiMHgDYq6yp/kKoEtY67kVoYIhL1VjsmgsodKLD4cIfldE1w2HE/1Vb2XS5kAt+i5L4nmHRH4w3xwyO4xTG9x+COFn7f5WpLou4ZTTV/LmE7oTx189fgYPWOopy3DNo+fKYimaH9Ganqm6SCqTGoEElXuidWVs8xbJYiG/RXFLjPEbIOnvKfDA1Lq7Z+SGcrX9LAInwAwJk5PQ==; From: Alberto Garcia To: qemu-devel@nongnu.org Subject: [PATCH v4 6/6] block: Make blockdev-reopen stable API Date: Wed, 17 Mar 2021 18:15:57 +0100 Message-Id: <4923fad2da7af38dba3c8ad00eb0be098648b588.1616000692.git.berto@igalia.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 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=178.60.130.6; envelope-from=berto@igalia.com; helo=fanzine.igalia.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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: Kevin Wolf , Vladimir Sementsov-Ogievskiy , Alberto Garcia , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This patch drops the 'x-' prefix from x-blockdev-reopen. Signed-off-by: Alberto Garcia --- 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 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 9150f765da..93fb0606e9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -4179,7 +4179,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 @@ -4217,9 +4217,9 @@ # image does not have a default backing file name as part of its # metadata. # -# Since: 4.0 +# Since: 6.0 ## -{ 'command': 'x-blockdev-reopen', +{ 'command': 'blockdev-reopen', 'data': { 'options': ['BlockdevOptions'] } } =20 ## diff --git a/blockdev.c b/blockdev.c index 7019397b05..d697db8417 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3580,7 +3580,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 *aio_ctxs =3D NULL; diff --git a/tests/qemu-iotests/155 b/tests/qemu-iotests/155 index 3400b0312a..fec43d662d 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 57aa88ecae..92a431315b 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 1a4413e6ab..e7498b5b3e 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 =3D False, o= ptions =3D opts) + result =3D self.vm.qmp('blockdev-reopen', conv_keys =3D False, opt= ions =3D opts) 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 74b74511b6..9206ddb954 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 4efdb35b91..b4d8bd9b55 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': { --=20 2.20.1