From nobody Sun Nov 24 04:46:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=yandex-team.ru Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1727878076395804.1373979101147; Wed, 2 Oct 2024 07:07:56 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5AF6211C9; Wed, 2 Oct 2024 10:07:55 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 65A9615E4; Wed, 2 Oct 2024 10:06:57 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9ECABA18; Wed, 2 Oct 2024 10:06:52 -0400 (EDT) Received: from forwardcorp1d.mail.yandex.net (forwardcorp1d.mail.yandex.net [178.154.239.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5DC23B80 for ; Wed, 2 Oct 2024 10:06:50 -0400 (EDT) Received: from mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:2e8b:0:640:9795:0]) by forwardcorp1d.mail.yandex.net (Yandex) with ESMTPS id 0E27360A05; Wed, 2 Oct 2024 17:06:48 +0300 (MSK) Received: from vsementsov-lin.. (unknown [2a02:6b8:b081:8026::1:2f]) by mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id S6cR231IXeA0-U58OG1no; Wed, 02 Oct 2024 17:06:47 +0300 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1727878007; bh=NC4l71ZU2QZsFuC9zoxFRkAOwdL2wTKK5ZcxHOVIUVU=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=HHbwSQ0KmyaTgOQPz+mwsBiMTnemoamCOFQzxaLiJr4fRmSgap4Zzp9MS4CTxB8uF 4Hl9GywCkpFWUiVhb+ibQRH8hu5G5rDSmOZ60BK3dzSQc1VxEffs48WteZbuJ0xzSP pjZhrqu1cszP3Pq4OJ2u8GnJIQmwgB9aewp0pfb0= Authentication-Results: mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v3 1/7] qapi: rename BlockJobChangeOptions to JobChangeOptions Date: Wed, 2 Oct 2024 17:06:10 +0300 Message-Id: <20241002140616.561652-2-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241002140616.561652-1-vsementsov@yandex-team.ru> References: <20241002140616.561652-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 X-Yandex-Filter: 1 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: DEQP2IGLTEQQFMJCZ4QBGH7TAWZUEJFO X-Message-ID-Hash: DEQP2IGLTEQQFMJCZ4QBGH7TAWZUEJFO X-MailFrom: vsementsov@yandex-team.ru X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: qemu-devel@nongnu.org, armbru@redhat.com, eblake@redhat.com, devel@lists.libvirt.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@yandex-team.ru, jsnow@redhat.com, pkrempa@redhat.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) X-ZM-MESSAGEID: 1727878077224116600 Content-Type: text/plain; charset="utf-8" We are going to move change action from block-job to job implementation, and then move to job-* extenral APIs, deprecating block-job-* APIs. This commit simplifies further transition. The commit is made by command git grep -l BlockJobChangeOptions | \ xargs sed -i 's/BlockJobChangeOptions/JobChangeOptions/g' Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Markus Armbruster --- block/mirror.c | 4 ++-- blockdev.c | 2 +- blockjob.c | 2 +- include/block/blockjob.h | 2 +- include/block/blockjob_int.h | 2 +- qapi/block-core.json | 12 ++++++------ 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 61f0a717b7..2816bb1042 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1258,11 +1258,11 @@ static bool commit_active_cancel(Job *job, bool for= ce) return force || !job_is_ready(job); } =20 -static void mirror_change(BlockJob *job, BlockJobChangeOptions *opts, +static void mirror_change(BlockJob *job, JobChangeOptions *opts, Error **errp) { MirrorBlockJob *s =3D container_of(job, MirrorBlockJob, common); - BlockJobChangeOptionsMirror *change_opts =3D &opts->u.mirror; + JobChangeOptionsMirror *change_opts =3D &opts->u.mirror; MirrorCopyMode current; =20 /* diff --git a/blockdev.c b/blockdev.c index 6740663fda..626f53102d 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3251,7 +3251,7 @@ void qmp_block_job_dismiss(const char *id, Error **er= rp) job_dismiss_locked(&job, errp); } =20 -void qmp_block_job_change(BlockJobChangeOptions *opts, Error **errp) +void qmp_block_job_change(JobChangeOptions *opts, Error **errp) { BlockJob *job; =20 diff --git a/blockjob.c b/blockjob.c index d5f29e14af..8cfbb15543 100644 --- a/blockjob.c +++ b/blockjob.c @@ -312,7 +312,7 @@ static bool block_job_set_speed(BlockJob *job, int64_t = speed, Error **errp) return block_job_set_speed_locked(job, speed, errp); } =20 -void block_job_change_locked(BlockJob *job, BlockJobChangeOptions *opts, +void block_job_change_locked(BlockJob *job, JobChangeOptions *opts, Error **errp) { const BlockJobDriver *drv =3D block_job_driver(job); diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 7061ab7201..5dd1b08909 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -181,7 +181,7 @@ bool block_job_set_speed_locked(BlockJob *job, int64_t = speed, Error **errp); * * Change the job according to opts. */ -void block_job_change_locked(BlockJob *job, BlockJobChangeOptions *opts, +void block_job_change_locked(BlockJob *job, JobChangeOptions *opts, Error **errp); =20 /** diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 4c3d2e25a2..d9c3b911d0 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -73,7 +73,7 @@ struct BlockJobDriver { * * Note that this can already be called before the job coroutine is ru= nning. */ - void (*change)(BlockJob *job, BlockJobChangeOptions *opts, Error **err= p); + void (*change)(BlockJob *job, JobChangeOptions *opts, Error **errp); =20 /* * Query information specific to this kind of block job. diff --git a/qapi/block-core.json b/qapi/block-core.json index c3b0a2376b..0156762024 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3068,18 +3068,18 @@ 'allow-preconfig': true } =20 ## -# @BlockJobChangeOptionsMirror: +# @JobChangeOptionsMirror: # # @copy-mode: Switch to this copy mode. Currently, only the switch # from 'background' to 'write-blocking' is implemented. # # Since: 8.2 ## -{ 'struct': 'BlockJobChangeOptionsMirror', +{ 'struct': 'JobChangeOptionsMirror', 'data': { 'copy-mode' : 'MirrorCopyMode' } } =20 ## -# @BlockJobChangeOptions: +# @JobChangeOptions: # # Block job options that can be changed after job creation. # @@ -3089,10 +3089,10 @@ # # Since: 8.2 ## -{ 'union': 'BlockJobChangeOptions', +{ 'union': 'JobChangeOptions', 'base': { 'id': 'str', 'type': 'JobType' }, 'discriminator': 'type', - 'data': { 'mirror': 'BlockJobChangeOptionsMirror' } } + 'data': { 'mirror': 'JobChangeOptionsMirror' } } =20 ## # @block-job-change: @@ -3102,7 +3102,7 @@ # Since: 8.2 ## { 'command': 'block-job-change', - 'data': 'BlockJobChangeOptions', 'boxed': true } + 'data': 'JobChangeOptions', 'boxed': true } =20 ## # @BlockdevDiscardOptions: --=20 2.34.1