From nobody Thu Dec 18 03:58:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1658846338; cv=none; d=zohomail.com; s=zohoarc; b=WyeqaE4CvxEyzFGV/auwx5n/IjsmSpAJORryaSuQHxYY5CimzbsmVVpjq1eKab1p35NrzHy3w4KvYWRsdj62uKZPSl1dtz2lKBlzY0D8duciqODQDDmXQf54zgK3PulnO+ShqYbuegxUuc8Eux2teTqVXFOIqfJl1D1vr2gbw84= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658846338; h=Content-Type:Content-Transfer-Encoding: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=MhcndMAVgYPyl0DzPOXD/EGbWDIIi+EuoohQAfcnbNU=; b=QoMhc/8gItWoTrXC/uc92s5CTN8HsUzrBwNroi1L6Ml4i4MquMrST1k3wOqIJlJ3SLxRGE/DoCPlHSZADaHvf4c9uObmnjF3KFPctJ8dVIJJiTWN6p038i1ztOGwA31ZA35BA0PdycfJ4UhenDe4HVqWQKr7zmhNxjCtkwECASM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1658846338901471.83997895504126; Tue, 26 Jul 2022 07:38:58 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-624-3IrOCNGUOOCGqArFd44b-g-1; Tue, 26 Jul 2022 10:38:55 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 43A683C0ED60; Tue, 26 Jul 2022 14:38:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2DCE12166B26; Tue, 26 Jul 2022 14:38:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 22C7A1947053; Tue, 26 Jul 2022 14:38:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0349F1947053 for ; Tue, 26 Jul 2022 14:38:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E05B140CFD0A; Tue, 26 Jul 2022 14:38:42 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6550940CF8EE for ; Tue, 26 Jul 2022 14:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658846337; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MhcndMAVgYPyl0DzPOXD/EGbWDIIi+EuoohQAfcnbNU=; b=DqxKlLdTO0XImLFdCSMbznCQnHObQ7zEWCcm00w2Hi9aTmYrNt517PKAoVlQIk7Tf42cak f9cJ85qPTcmuPs7m5S72auC754ugoFUzgzCv6sRqGBD02SsAEpQ2NpNEUZKBd88gSeXacq R7+0lgnUtxT5tPiuQzSSnGL1sX1pemI= X-MC-Unique: 3IrOCNGUOOCGqArFd44b-g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 42/80] qemu: monitor: Remove unused qemuMonitorDriveMirror Date: Tue, 26 Jul 2022 16:37:20 +0200 Message-Id: <9b0a608f927e8450d69f6369ed4a7c32318d5a64.1658843187.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658846340372100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- src/qemu/qemu_monitor.c | 21 ------------------ src/qemu/qemu_monitor.h | 10 --------- src/qemu/qemu_monitor_json.c | 41 ------------------------------------ src/qemu/qemu_monitor_json.h | 11 ---------- tests/qemumonitorjsontest.c | 2 -- 5 files changed, 85 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a4b1b90c7c..9c24b842bd 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2871,27 +2871,6 @@ qemuMonitorDeleteSnapshot(qemuMonitor *mon, const ch= ar *name) } -/* Start a drive-mirror block job. bandwidth is in bytes/sec. */ -int -qemuMonitorDriveMirror(qemuMonitor *mon, - const char *device, const char *file, - const char *format, unsigned long long bandwidth, - unsigned int granularity, unsigned long long buf_si= ze, - bool shallow, - bool reuse) -{ - VIR_DEBUG("device=3D%s, file=3D%s, format=3D%s, bandwidth=3D%lld, " - "granularity=3D%#x, buf_size=3D%lld, shallow=3D%d, reuse=3D%= d", - device, file, NULLSTR(format), bandwidth, granularity, - buf_size, shallow, reuse); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONDriveMirror(mon, device, file, format, bandwidth, - granularity, buf_size, shallow, reus= e); -} - - int qemuMonitorBlockdevMirror(qemuMonitor *mon, const char *jobname, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 352cf0ada5..aee9ca0e6a 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -979,16 +979,6 @@ int qemuMonitorDeleteSnapshot(qemuMonitor *mon, const = char *name); int qemuMonitorTransaction(qemuMonitor *mon, virJSONValue **actions) ATTRIBUTE_NONNULL(2); -int qemuMonitorDriveMirror(qemuMonitor *mon, - const char *device, - const char *file, - const char *format, - unsigned long long bandwidth, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool reuse) - ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); int qemuMonitorBlockdevMirror(qemuMonitor *mon, const char *jobname, bool persistjob, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9363f86a55..bd3130075b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4096,47 +4096,6 @@ qemuMonitorJSONDelObject(qemuMonitor *mon, } -/* speed is in bytes/sec */ -int -qemuMonitorJSONDriveMirror(qemuMonitor *mon, - const char *device, const char *file, - const char *format, unsigned long long speed, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool reuse) -{ - g_autoptr(virJSONValue) cmd =3D NULL; - g_autoptr(virJSONValue) reply =3D NULL; - const char *syncmode =3D "full"; - const char *mode =3D "absolute-paths"; - - if (shallow) - syncmode =3D "top"; - - if (reuse) - mode =3D "existing"; - - cmd =3D qemuMonitorJSONMakeCommand("drive-mirror", - "s:device", device, - "s:target", file, - "Y:speed", speed, - "z:granularity", granularity, - "P:buf-size", buf_size, - "s:sync", syncmode, - "s:mode", mode, - "S:format", format, - NULL); - if (!cmd) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - return qemuMonitorJSONCheckError(cmd, reply); -} - - int qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, const char *jobname, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 31f6214ec4..f409480c0b 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -305,17 +305,6 @@ int qemuMonitorJSONTransaction(qemuMonitor *mon, virJSONValue **actions) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int -qemuMonitorJSONDriveMirror(qemuMonitor *mon, - const char *device, - const char *file, - const char *format, - unsigned long long speed, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool reuse) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); int qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 0bff1ed4d0..265fa0b705 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1213,7 +1213,6 @@ GEN_TEST_FUNC(qemuMonitorJSONGraphicsRelocate, VIR_DO= MAIN_GRAPHICS_TYPE_SPICE, "localhost", 12345, 12346, "certsubjectval") GEN_TEST_FUNC(qemuMonitorJSONRemoveNetdev, "net0") GEN_TEST_FUNC(qemuMonitorJSONDelDevice, "ide0") -GEN_TEST_FUNC(qemuMonitorJSONDriveMirror, "vdb", "/foo/bar", "formatstr", = 1024, 1234, 31234, true, true) GEN_TEST_FUNC(qemuMonitorJSONBlockdevMirror, "jobname", true, "vdb", "targ= etnode", 1024, 1234, 31234, true, true) GEN_TEST_FUNC(qemuMonitorJSONBlockStream, "vdb", "jobname", true, "/foo/ba= r1", "backingnode", "backingfilename", 1024) GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "jobname", true, "/foo/ba= r1", "topnode", "/foo/bar2", "basenode", "backingfilename", 1024) @@ -3001,7 +3000,6 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONGraphicsRelocate); DO_TEST_GEN(qemuMonitorJSONRemoveNetdev); DO_TEST_GEN(qemuMonitorJSONDelDevice); - DO_TEST_GEN(qemuMonitorJSONDriveMirror); DO_TEST_GEN(qemuMonitorJSONBlockdevMirror); DO_TEST_GEN(qemuMonitorJSONBlockStream); DO_TEST_GEN(qemuMonitorJSONBlockCommit); --=20 2.36.1