From nobody Sat Nov 23 11:54:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1731315269132576.5133727209774; Mon, 11 Nov 2024 00:54:29 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 254AF1720; Mon, 11 Nov 2024 03:54:28 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C77A51899; Mon, 11 Nov 2024 03:53:24 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 0358E1720; Mon, 11 Nov 2024 03:53:17 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 7BA1C1724 for ; Mon, 11 Nov 2024 03:53:16 -0500 (EST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-453-ROO6zafsPwWR8HCBWYI-Iw-1; Mon, 11 Nov 2024 03:53:13 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d531a19a9so2415405f8f.1 for ; Mon, 11 Nov 2024 00:53:13 -0800 (PST) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381eda1433esm12240597f8f.111.2024.11.11.00.53.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 00:53:11 -0800 (PST) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id EA39B3A63248 for ; Mon, 11 Nov 2024 09:53:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731315196; h=from:from: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; bh=1ZYZlPPfmIcPdpR9PQdEHGbeE6YoE8Nx7CIHhSwQmDA=; b=IKmOfWxMwzmvm11tvjDKGa6FUaGMGMOHTs87EnsgtQ/gStXXc0s9u8GUssv6y73EqlA//P a/JJjdGMZztUn6KvKD0MKB6ZqkH+XvdFUWxZeeaN4+RKhNYgYrzWO1WYMhXm10NCS1yABW ZXWmHFAgfeIK6pYw0uTqa2AdiA7gHYY= X-MC-Unique: ROO6zafsPwWR8HCBWYI-Iw-1 X-Mimecast-MFC-AGG-ID: ROO6zafsPwWR8HCBWYI-Iw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731315192; x=1731919992; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ZYZlPPfmIcPdpR9PQdEHGbeE6YoE8Nx7CIHhSwQmDA=; b=oM13LnCTkgyt0iwtfmVFrFS+gwbWkk65prcPSZAh7oYFy7ukBmn+mwKCn/fLVNQ4Gy BxAoVZZd6dt6jEmNmr/nRSJchSiTWZPKi4lP2HQD05r0ItR1SbtWw3EmyeRWa7QChN81 Rds7R9OhM23maVD/R8wYnQ01LJwW25G/ANyau2NeTtlrcF/dAW2R1+YKVrb4os8bLnU3 3YX+gpufKQ9Qi+xitrw4GWErDqIIAHBhsmsuutQeu9iI0XHqEldGXj2qJ3P3vyL2ig+l ik/x99s2BgiZjXbOp6BlbvBlOVtID7UX/tkJLfAnvQxz2L9I3ewe3cUJlByUHTxauXpa uo6Q== X-Gm-Message-State: AOJu0YwSHqAdafxOJbt3wn548k+FHR/600gcYoXzHHgrl3+VjRCxaDTc 0rWzzYxrIvXIe+YMeV9ryKa6S3UPceH1UoAfyVIZO21TgEAcmz+Cro+Odt0Du/aERvrJgzkM5eC jCeyUJ/35uwpu6MrqGjmAE3f367HpBiKX6xeB5jGkMr6rThVfWxgNa+CIOCAsNWyETXAynMa/xY CM1MpTXBL42JMxafIo23Ei1dhcvygXb+xrpvPD1uk= X-Received: by 2002:a05:6000:2710:b0:381:f604:3d55 with SMTP id ffacd0b85a97d-381f6043d97mr5815144f8f.52.1731315192425; Mon, 11 Nov 2024 00:53:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1aRVWj3We+A0vyF7wbM5DT4daUMJrhfHqH1/sZai+m45TWzT7ASuuoQIJTulcazWENtrf3Q== X-Received: by 2002:a05:6000:2710:b0:381:f604:3d55 with SMTP id ffacd0b85a97d-381f6043d97mr5815128f8f.52.1731315192099; Mon, 11 Nov 2024 00:53:12 -0800 (PST) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH 3/3] qemu_hotplug: Do not report error for hot-unplugging non-existing device Date: Mon, 11 Nov 2024 09:53:09 +0100 Message-ID: X-Mailer: git-send-email 2.47.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: X_nLpfS-_vzPbPf2m80fXrhkORJp6kF8ANF9fVLjj3Q_1731315192 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IDRPJEVCWAWJW2M7XY26OKS35Q7C7CLF X-Message-ID-Hash: IDRPJEVCWAWJW2M7XY26OKS35Q7C7CLF X-MailFrom: mkletzan@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1731315270054116600 Content-Type: text/plain; charset="utf-8"; x-default="true" The code just does not match the comment above which says we should claim success. And it makes sense since a removal from qemu was requested and qemu could not find the device. Without this patch such codepath would lead to libvirt not removing the device from the XML and no error being set, but the API would still return an error value. Signed-off-by: Martin Kletzander --- src/qemu/qemu_hotplug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f856e26c1877..d23da0a553c0 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -136,6 +136,7 @@ qemuDomainDeleteDevice(virDomainObj *vm, * domain XML is queried right after detach API the * device would still be there. */ VIR_DEBUG("Detaching of device %s failed and no event arrived"= , alias); + rc =3D 0; } } =20 --=20 2.47.0