From nobody Mon Feb 9 02:55:54 2026 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=1698234123; cv=none; d=zohomail.com; s=zohoarc; b=jsUXFvg2kYv/A6/WTHmxcZfBdUAp7ns2ENj1jH7J8v8o7gkC/95ZgdmmY6GQglSNMNcfnMhnY+KFucqg8zZs1MvPUj6xIWaPBf6LtWJ2sXlN7v+62vEEyeIlxCkX1cg1+myQ0JWcK1lIPuaYi8qPtXbcmVNePRgXrgSIXiZVlzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698234123; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=cwj7JJZ+HeGUCeVXl+OUZ9CCMUzrB4B1CTxhwgx7mdA=; b=JwRaQ/6TyYKAbHf8XYpnDdYkXAkxByu7tXFuItLIA8ffjNM5PRjeiej18JYH3JiETqpJPO2OP9fw2dtw1w3D6Tk7M7MrMoM53BIiGQyjQUOqURwNNozKicDCBeDF5BSAYG3kTKtwtNKCxo/R3G7bbO4RcMnQPDbOJMkAinUND8M= 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 1698234123903139.08350663599958; Wed, 25 Oct 2023 04:42:03 -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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-244-bonkDBs5OiKlccnbdkklFw-1; Wed, 25 Oct 2023 07:40:17 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73D13853088; Wed, 25 Oct 2023 11:40:03 +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 590EC112BC; Wed, 25 Oct 2023 11:40:03 +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 C9E0319466ED; Wed, 25 Oct 2023 11:40:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 445CC1946586 for ; Wed, 25 Oct 2023 11:40:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1EC86492BFB; Wed, 25 Oct 2023 11:40:02 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 982BA492BFA for ; Wed, 25 Oct 2023 11:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698234122; 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=cwj7JJZ+HeGUCeVXl+OUZ9CCMUzrB4B1CTxhwgx7mdA=; b=AHiQOjvVEbtuMtJ0kA4ngGib8yFqsHJilE2YM3UULD+7JfcM8gTks3mVsY+NPq8/QlWUxa N7ErVXJ3Lfrxcs+pCIftgIgb7XTMlO7lwW7yuCN1G/Wn7EbvjT8JqNwDRyHzOzNZD+z8XA 93T91N14ZznNS/tnoqQw8gME6eAoprk= X-MC-Unique: bonkDBs5OiKlccnbdkklFw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 22/22] qemu: block: Remove unused flags QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_ flags Date: Wed, 25 Oct 2023 13:39:32 +0200 Message-ID: <108d74bee5dd869fb980f146c702b025c8021231.1698233503.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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 3.4.1 on 10.11.54.5 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: 1698234125843100001 Content-Type: text/plain; charset="utf-8" QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_SKIP_UNMAP is no longer referenced inside the code. QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY is passed from various code paths to the qemuBlockStorageSourceGetBackendProps helper, but it's no longer used. Both thus can be removed. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 7 +------ src/qemu/qemu_block.h | 4 +--- tests/qemublocktest.c | 7 ++----- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index a625e72a5d..382015f293 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1006,11 +1006,6 @@ qemuBlockStorageSourceAddBlockdevCommonProps(virJSON= Value **props, * use legacy formatting of attributes (for -drive / old qemus) * QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY: * omit any data which does not identify the image itself - * QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY: - * use the auto-read-only feature of qemu - * QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_SKIP_UNMAP: - * don't enable 'discard:unmap' option for passing through discards - * (note that this is disabled also for _LEGACY and _TARGET_ONLY opti= ons) * QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_EFFECTIVE_NODE: * the 'protocol' node is used as the effective/top node of a virStor= ageSource * @@ -1510,7 +1505,7 @@ qemuBlockStorageSourceAttachPrepareBlockdev(virStorag= eSource *src, virStorageSource *backingStore) { g_autoptr(qemuBlockStorageSourceAttachData) data =3D NULL; - unsigned int backendpropsflags =3D QEMU_BLOCK_STORAGE_SOURCE_BACKEND_P= ROPS_AUTO_READONLY; + unsigned int backendpropsflags =3D 0; data =3D g_new0(qemuBlockStorageSourceAttachData, 1); diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index 9757108501..5c784a4386 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -66,9 +66,7 @@ qemuBlockStorageSourceSupportsConcurrentAccess(virStorage= Source *src); typedef enum { QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY =3D 1 << 0, QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY =3D 1 << 1, - QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY =3D 1 << 2, - QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_SKIP_UNMAP =3D 1 << 3, - QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_EFFECTIVE_NODE =3D 1 << 4, + QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_EFFECTIVE_NODE =3D 1 << 2, } qemuBlockStorageSourceBackendPropsFlags; virJSONValue * diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index b8db1a2570..c581bd1748 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -285,9 +285,6 @@ testQemuDiskXMLToProps(const void *opaque) for (n =3D disk->src; virStorageSourceIsBacking(n); n =3D n->backingSt= ore) { g_autofree char *backingstore =3D NULL; - unsigned int backendpropsflagsnormal =3D QEMU_BLOCK_STORAGE_SOURCE= _BACKEND_PROPS_AUTO_READONLY; - unsigned int backendpropsflagstarget =3D QEMU_BLOCK_STORAGE_SOURCE= _BACKEND_PROPS_AUTO_READONLY | - QEMU_BLOCK_STORAGE_SOURCE_B= ACKEND_PROPS_TARGET_ONLY; if (testQemuDiskXMLToJSONFakeSecrets(n) < 0) return -1; @@ -298,8 +295,8 @@ testQemuDiskXMLToProps(const void *opaque) qemuDomainPrepareDiskSourceData(disk, n); if (!(formatProps =3D qemuBlockStorageSourceGetFormatProps(n, n->b= ackingStore)) || - !(storageSrcOnlyProps =3D qemuBlockStorageSourceGetBackendProp= s(n, backendpropsflagstarget)) || - !(storageProps =3D qemuBlockStorageSourceGetBackendProps(n, ba= ckendpropsflagsnormal)) || + !(storageSrcOnlyProps =3D qemuBlockStorageSourceGetBackendProp= s(n, QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY)) || + !(storageProps =3D qemuBlockStorageSourceGetBackendProps(n, 0)= ) || !(backingstore =3D qemuBlockGetBackingStoreString(n, true))) { if (!data->fail) { VIR_TEST_VERBOSE("failed to generate qemu blockdev props"); --=20 2.41.0