From nobody Mon Dec 15 23:05:16 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=1658846351; cv=none; d=zohomail.com; s=zohoarc; b=SJ0fNoIZ3kAKnLTGiCvmEVk/kO9BYm0LTr1cjtSIDwWM+7hGy3Cck16muyGMnPHLk/znANPh2Wuo/Rp3G3O5MdeAROXR+A7SW9Q4JK35Xa+gByahF/0Wht4O2MLk3PPPqKzt+XA4naEtC1ExLLyKFitkZBoqP1iKGiUP7hovUcE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658846351; 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=YDYP0Ymv3GLGIkYSyMGjy9DFCkZ6J66/7SVphwgFdZI=; b=SpwwS6Aaazc9d2d5Cb/L+oXWV7l8JUQZR6NilggJvw1nJ2TcBQorDVCziDX4whITKOGl4+DLKu43IQssVe48pOx4aKwGl01jIP8oIoeDul65G2Ls4mLBNFPKR2h5z92ZrbODiZQkmwUZpeBRpxYThszwHau0fw0wTdoVyDxSfAo= 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 16588463511671020.3306484722456; Tue, 26 Jul 2022 07:39:11 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-28-VG0MskAQPaCFdhuXM0x4PA-1; Tue, 26 Jul 2022 10:39:04 -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 B2340823F0D; Tue, 26 Jul 2022 14:38:37 +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 9E2232166B2C; Tue, 26 Jul 2022 14:38:37 +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 763CF1945DBE; Tue, 26 Jul 2022 14:38:37 +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 2FF521945DAE for ; Tue, 26 Jul 2022 14:38:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id F40CF40CFD0B; Tue, 26 Jul 2022 14:38:28 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B32040CFD0A for ; Tue, 26 Jul 2022 14:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658846349; 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=YDYP0Ymv3GLGIkYSyMGjy9DFCkZ6J66/7SVphwgFdZI=; b=Tt2YxtgxwrURBGz+jmZDWuPuX4Br3r3oMnj2nPAOeBmu4rWUEgqIv9yi8nhnDc+LH/TuBp J7x5tZx6ao+NtlHuaqS/pivBcY97t9nZBK4Ty/8VFzmuMV79nqtQClCVVrfMPwDD0zZHAX mKyAFa3I9wphvJMRijyruIBoJC5Q+Ao= X-MC-Unique: VG0MskAQPaCFdhuXM0x4PA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 27/80] qemu: block: Remove pre-blockdev code paths Date: Tue, 26 Jul 2022 16:37:05 +0200 Message-Id: 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: 1658846352330100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- src/qemu/qemu_backup.c | 2 +- src/qemu/qemu_block.c | 10 +--------- src/qemu/qemu_block.h | 1 - src/qemu/qemu_migration.c | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index d2a5d2db5f..b90185a375 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -536,7 +536,7 @@ qemuBackupBeginPullExportDisks(virDomainObj *vm, if (!dd->backupdisk->exportname) dd->backupdisk->exportname =3D g_strdup(dd->domdisk->dst); - if (qemuBlockExportAddNBD(vm, NULL, + if (qemuBlockExportAddNBD(vm, dd->store, dd->backupdisk->exportname, false, diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 81c807660f..141bf1b3e7 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -3534,21 +3534,18 @@ qemuBlockExportGetNBDProps(const char *nodename, /** * qemuBlockExportAddNBD: * @vm: domain object - * @drivealias: (optional) alias of -drive to export in pre-blockdev confi= gurations * @src: disk source to export * @exportname: name for the export * @writable: whether the NBD export allows writes * @bitmap: (optional) block dirty bitmap to export along * * This function automatically selects the proper invocation of exporting a - * block backend via NBD in qemu. This includes use of nodename for blockd= ev - * and proper configuration for the exportname for older qemus. + * block backend via NBD in qemu. * * This function must be called while in the monitor context. */ int qemuBlockExportAddNBD(virDomainObj *vm, - const char *drivealias, virStorageSource *src, const char *exportname, bool writable, @@ -3558,11 +3555,6 @@ qemuBlockExportAddNBD(virDomainObj *vm, g_autoptr(virJSONValue) nbdprops =3D NULL; const char *bitmaps[2] =3D { bitmap, NULL }; - /* older qemu versions didn't support configuring the exportname and - * took the 'drivealias' as the export name */ - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) - return qemuMonitorNBDServerAdd(priv->mon, drivealias, NULL, writab= le, NULL); - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCK_EXPORT_ADD)) return qemuMonitorNBDServerAdd(priv->mon, src->nodeformat, exportname, writable, bitmap); diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index bcd3f5960b..b22a541797 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -291,7 +291,6 @@ qemuBlockExportGetNBDProps(const char *nodename, int qemuBlockExportAddNBD(virDomainObj *vm, - const char *drivealias, virStorageSource *src, const char *exportname, bool writable, diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 16d65ff22e..a6d097c304 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -614,7 +614,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver, server_started =3D true; } - if (qemuBlockExportAddNBD(vm, diskAlias, disk->src, diskAlias, tru= e, NULL) < 0) + if (qemuBlockExportAddNBD(vm, disk->src, diskAlias, true, NULL) < = 0) goto exit_monitor; qemuDomainObjExitMonitor(vm); } --=20 2.36.1