From nobody Mon Dec 15 23:38:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1658846378; cv=none; d=zohomail.com; s=zohoarc; b=MRC0xl0JY9zBXsiHit1IqDj7XgcPLL4syH+DDxO1/L3uY1NEMFMXiDeXq5tYXm28yExT4pvlEuqCdufazgqLNsQXwK1XdRW8b3EcHTm3SbRCR4RyTIO3DqHVvWBW9uj6pt00YDtItUaRZiU06emUKO7E+yjMETneIxv2IhfZTBU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658846378; 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=exci8XWZAKzJnNJoH2lqkdoLc6Jav38aV+Ik5ZCWuI0=; b=UrQ+adX4FSNe7JnbKTmzgINO+O8KCZxwPdbYa1k/sFuqOTy5qAOcHPWBE3v1eM5IgWbd7zu41piqS9y8BgjT9Ri6hbU5b+oBIdMVNAsabMgQHHrg4siTJ0M0gWaGP3+fQPDlBrSNG9iKLHwhP+A9UOnNVkKAqpu6skdAy4t3EQQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1658846378893675.8756351600484; Tue, 26 Jul 2022 07:39:38 -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-665-rV96aldRMu2FD6ajOtYbQQ-1; Tue, 26 Jul 2022 10:39:32 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 759171C004FA; Tue, 26 Jul 2022 14:39:15 +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 622CF2026D64; Tue, 26 Jul 2022 14:39:15 +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 DB1451940375; Tue, 26 Jul 2022 14:39:13 +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 AB0F91947BA4 for ; Tue, 26 Jul 2022 14:39:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 66D9340CFD0B; Tue, 26 Jul 2022 14:39:02 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id E238940CFD0A for ; Tue, 26 Jul 2022 14:39:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658846377; 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=exci8XWZAKzJnNJoH2lqkdoLc6Jav38aV+Ik5ZCWuI0=; b=cJmw4zkFRMnqp8rmAYdZ3Z0+F1GdvM9UHmClgOKbiDkxklrARUUxPPTQpsGduOLvTpa8TI IOe64Ra9NL/IGKl9/caRjnOAD1gR1xnZBDvyn4a4BHO2EDXlfaAiomNWcumMFI9P2u4fQK Vl7v7cu7GH/XMVnTTkbPXTGMY1CKC1U= X-MC-Unique: rV96aldRMu2FD6ajOtYbQQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 63/80] qemu: block: Remove support for legacy disk hotplug/unplug Date: Tue, 26 Jul 2022 16:37:41 +0200 Message-Id: <9b6521a5109aab5ae193efffbd70074266a3ff52.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.4 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: 1658846380430100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- src/qemu/qemu_block.c | 14 -------------- src/qemu/qemu_block.h | 2 -- src/qemu/qemu_command.c | 3 +-- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index afdcca2813..f504d8bc4c 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1304,7 +1304,6 @@ qemuBlockStorageSourceAttachDataFree(qemuBlockStorage= SourceAttachData *data) g_free(data->encryptsecretAlias); g_free(data->httpcookiesecretAlias); g_free(data->driveCmd); - g_free(data->driveAlias); g_free(data->chardevAlias); g_free(data); } @@ -1472,13 +1471,6 @@ qemuBlockStorageSourceAttachApply(qemuMonitor *mon, qemuBlockStorageSourceAttachApplyFormat(mon, data) < 0) return -1; - if (data->driveCmd) { - if (qemuMonitorAddDrive(mon, data->driveCmd) < 0) - return -1; - - data->driveAdded =3D true; - } - if (data->chardevDef) { if (qemuMonitorAttachCharDev(mon, data->chardevAlias, data->charde= vDef) < 0) return -1; @@ -1515,12 +1507,6 @@ qemuBlockStorageSourceAttachRollback(qemuMonitor *mo= n, } } - if (data->driveAdded) { - if (qemuMonitorDriveDel(mon, data->driveAlias) < 0) - VIR_WARN("Unable to remove drive %s (%s) after failed 'device_= add'", - data->driveAlias, data->driveCmd); - } - if (data->formatAttached) ignore_value(qemuMonitorBlockdevDel(mon, data->formatNodeName)); diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index d29d444a5a..b083b7565e 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -81,8 +81,6 @@ struct qemuBlockStorageSourceAttachData { bool formatAttached; char *driveCmd; - char *driveAlias; - bool driveAdded; virDomainChrSourceDef *chardevDef; char *chardevAlias; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ed718eb81b..865464a772 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10624,8 +10624,7 @@ qemuBuildStorageSourceAttachPrepareDrive(virDomainD= iskDef *disk) data =3D g_new0(qemuBlockStorageSourceAttachData, 1); - if (!(data->driveCmd =3D qemuBuildDriveStr(disk)) || - !(data->driveAlias =3D qemuAliasDiskDriveFromDisk(disk))) + if (!(data->driveCmd =3D qemuBuildDriveStr(disk))) return NULL; return g_steal_pointer(&data); --=20 2.36.1