From nobody Sun Feb 8 22:21:09 2026 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=1672936284; cv=none; d=zohomail.com; s=zohoarc; b=eX2+gnAj1U8lquVQXKQ5EykJRSY03oIf11s02BFgE1VArhyrmMeUqxALi9pYs9+5kMqusG0rlyAiP0mDebI9ug7zNsd7ZqNwrl8n4PbRT0obDAPQmTvSPNkyEO6ucdNm5bY+1EhHna79qSdCX1gQgjbIZweMYNIuzgHwvPlPHbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672936284; 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=hVIGNkEFbnr+TB50lJCFExS/fVw6IvDQRKlXxjhpPDw=; b=GIh6Cndqp2odiLl7edhddzweyaKBksQEhIRLk3fbSon24PZIyTzXeJ/YADKfG76pOZY08oRtWSpNUVCtgvNsle9BmnG62Bl6Ehejs9lbOnqLFILlV0j8kT4BSVcnMhm8k3N2MhSqm5mpzyHWQnQWGMoh2FnBqA3JRCNfxkOjts4= 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 1672936284338594.2874713011282; Thu, 5 Jan 2023 08:31:24 -0800 (PST) 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-480-NUHydtYWPsa00mABSnhoJw-1; Thu, 05 Jan 2023 11:31:19 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 30287100F82D; Thu, 5 Jan 2023 16:31:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C011492D8B; Thu, 5 Jan 2023 16:31:07 +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 0FE0A1947071; Thu, 5 Jan 2023 16:31:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D8C5A1947076 for ; Thu, 5 Jan 2023 16:31:05 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CE4702166B31; Thu, 5 Jan 2023 16:31:05 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F90F2166B30 for ; Thu, 5 Jan 2023 16:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672936283; 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=hVIGNkEFbnr+TB50lJCFExS/fVw6IvDQRKlXxjhpPDw=; b=JJc9FRftkQbabwh2q/50sesOcrjlPp56kExgz8BFRgdeE7u7vFqeLQr/dyKEPoRbZOk9Um 2fRjccO0k9ARwn9uwd0kCxB5neUCasbz+K8u+yrUEvdRkcfis8O041FUBydI58yEWpCCj1 va6AGVL06m2mLLTrpx59hoX4kUAKj8Y= X-MC-Unique: NUHydtYWPsa00mABSnhoJw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 33/36] qemu: driver: Don't allow certain operations with FD-passed disks Date: Thu, 5 Jan 2023 17:30:22 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.1 on 10.11.54.10 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: 1672936285946100010 Content-Type: text/plain; charset="utf-8" Probing stats and block copy to a FD passed image is not yet supported. Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- src/qemu/qemu_driver.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c086d4069b..4df7f42ae4 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10499,6 +10499,13 @@ qemuDomainBlockPeek(virDomainPtr dom, goto cleanup; } + if (virStorageSourceIsFD(disk->src)) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("peeking is not supported for FD-passed images")); + goto cleanup; + + } + if (qemuDomainStorageFileInit(driver, vm, disk->src, NULL) < 0) goto cleanup; @@ -10858,6 +10865,12 @@ qemuDomainGetBlockInfo(virDomainPtr dom, goto endjob; } + if (virStorageSourceIsFD(disk->src)) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("block info is not supported for fd-passed disk i= mage")); + goto endjob; + } + /* for inactive domains we have to peek into the files */ if (!virDomainObjIsActive(vm)) { if ((qemuStorageLimitsRefresh(driver, cfg, vm, disk->src, false)) = < 0) @@ -14689,6 +14702,12 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, if (!qemuDomainDiskBlockJobIsSupported(disk)) goto endjob; + if (virStorageSourceIsFD(mirror)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("copy to a FD passed disk source is not yet suppo= rted")); + goto endjob; + } + if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_LUN && virDomainDiskDefSourceLUNValidate(mirror) < 0) goto endjob; @@ -17942,6 +17961,9 @@ qemuDomainGetStatsOneBlockFallback(virQEMUDriver *d= river, if (virStorageSourceIsEmpty(src)) return 0; + if (virStorageSourceIsFD(src)) + return 0; + if (qemuStorageLimitsRefresh(driver, cfg, dom, src, true) <=3D 0) { virResetLastError(); return 0; --=20 2.38.1