From nobody Mon Feb 9 10:32:22 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=1675182763; cv=none; d=zohomail.com; s=zohoarc; b=cfqTMy0B++jiYgtNIz316Wvv9XscDeML+hzJ5AOdnQ8Pw//vEQ0WqqmT5Qx1D+p38PJM7aB4e10ATRlvFRbSyH2u7cnkv6pVDZyeia78WGwTdb94XpTqKM+HMAPzHYTFv7tGtpZdDytYGfM84JgfIVH5iPDecm+rZ9hQaZ0wQN0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675182763; 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=PLo0vLRljX5SobSGWY4KRM2xpcmhWr3rHHvq3NFBQ2M=; b=Geuse+Rvh/VItFrJbFtjKal+7YERYPQ8hRo1VCpYpRX203aVbvXG5kfxMmZ9RXA3ZAelcpVmgg3kfQ0dvy/gRUcLi5ekgZGgZlXeq5aFvzqqJ7cR3gR16PNy0wbzn0caN9RKPCQvmBuzxp+BrLzywZX6kL6uSLSK7ESBp3HC2g8= 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 1675182763218735.5252576759826; Tue, 31 Jan 2023 08:32:43 -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-600-Ala59krFOPOlcAMMb1FvMw-1; Tue, 31 Jan 2023 11:32:35 -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 88E1088B506; Tue, 31 Jan 2023 16:32:28 +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 76585492C3E; Tue, 31 Jan 2023 16:32:28 +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 67DBF194658F; Tue, 31 Jan 2023 16:32:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9AF4A1946589 for ; Tue, 31 Jan 2023 16:32:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 90808422F2; Tue, 31 Jan 2023 16:32:25 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-29.brq.redhat.com [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3AE6175A2 for ; Tue, 31 Jan 2023 16:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675182762; 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=PLo0vLRljX5SobSGWY4KRM2xpcmhWr3rHHvq3NFBQ2M=; b=RAa1imaDdgmdGWEbPO1c/ZsqNEbTF5nGIXUI18TaXDU4wIgct0tihSIRC7s/JUahJ5Bv6B DhG/be8PIKU2eRz3IyODl1kSY+lMiHEa/FEO5woA3quLLIiYYpUWffc/5vV+8ZV6hUsWxA k/bEWWbsdjquCb53bT9dygCklEyym5c= X-MC-Unique: Ala59krFOPOlcAMMb1FvMw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 7/7] qemu: block: Properly handle FD-passed disk hot-(un-)plug Date: Tue, 31 Jan 2023 17:32:13 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: 1675182764259100005 Content-Type: text/plain; charset="utf-8" The hotplug code paths need to be able to pass the FDs to the monitor to ensure that hotplug works. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index e865aa17f9..c218262691 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1410,6 +1410,9 @@ qemuBlockStorageSourceAttachApplyStorageDeps(qemuMoni= tor *mon, qemuMonitorAddObject(mon, &data->tlsProps, &data->tlsAlias) < 0) return -1; + if (qemuFDPassTransferMonitor(data->fdpass, mon) < 0) + return -1; + return 0; } @@ -1559,6 +1562,8 @@ qemuBlockStorageSourceAttachRollback(qemuMonitor *mon, if (data->tlsKeySecretAlias) ignore_value(qemuMonitorDelObject(mon, data->tlsKeySecretAlias, fa= lse)); + qemuFDPassTransferMonitorRollback(data->fdpass, mon); + virErrorRestore(&orig_err); } @@ -1609,6 +1614,8 @@ qemuBlockStorageSourceDetachPrepare(virStorageSource = *src) if (srcpriv->tlsKeySecret) data->tlsKeySecretAlias =3D g_strdup(srcpriv->tlsKeySecret->al= ias); + + data->fdpass =3D srcpriv->fdpass; } return g_steal_pointer(&data); --=20 2.39.1