From nobody Thu Nov 28 12:51:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1670947310; cv=none; d=zohomail.com; s=zohoarc; b=NWz4zNMLW605yBTJO8ecfXbkoyNYOOUzPcqVYO2MQcWP3/s3xurE9ZkL87s9ywe5nEqeIgdnEQnQlbosoKHF9R5UsnIlXheDyyzAC122bkxJizVbxNNn/lQRwyu4eCtMflchO0zBSqdBckpKXelEp3cuSVNqlT3m9EbBRqBkmJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670947310; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ryi6cpb7BKe6PnGwXvBdTnm0HFWHWSERp75CSqVgKRY=; b=EjIbHDW54AF8kx8mV/hf1mIGgXQFR0Z/WQvYQLSHoedR5eXqkVgBhoHEKQuMCvxa2Ezk+3KGbrncsfl/MCVkbrzfPvYm0iHJ9rrALrc4xlTtlGW/wn2ENyychZMIz8wQSaECHzO2zgmuk/sDZcIMIEK2lLIsCHHLNal19B1gcgk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1670947310666876.1357648478321; Tue, 13 Dec 2022 08:01:50 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.460728.718726 (Exim 4.92) (envelope-from ) id 1p57iT-000301-Nx; Tue, 13 Dec 2022 16:01:13 +0000 Received: by outflank-mailman (output) from mailman id 460728.718726; Tue, 13 Dec 2022 16:01:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p57iT-0002zr-L2; Tue, 13 Dec 2022 16:01:13 +0000 Received: by outflank-mailman (input) for mailman id 460728; Tue, 13 Dec 2022 16:01:11 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p57iR-0001ta-M4 for xen-devel@lists.xenproject.org; Tue, 13 Dec 2022 16:01:11 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5c5dd08d-7aff-11ed-8fd2-01056ac49cbb; Tue, 13 Dec 2022 17:01:10 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3D78621AEB; Tue, 13 Dec 2022 16:01:10 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 126DF138EE; Tue, 13 Dec 2022 16:01:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dnYyA8ahmGOTKQAAMHmgww (envelope-from ); Tue, 13 Dec 2022 16:01:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5c5dd08d-7aff-11ed-8fd2-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1670947270; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ryi6cpb7BKe6PnGwXvBdTnm0HFWHWSERp75CSqVgKRY=; b=j7OBQOE0S7Myf69+kqS9ueBkolTn5whgOPeiQNe8+KXYEyqdUdNbEBVOPQ1yDgB+JjPlwG wyxeHYqw4J/+XJgPWY2mfJ8Ab5dPQjQSi5eO1pOaG09q/jB3Fg2+W3gTle9khzNlAmQXxL XAXtfFtQOwfZz39ma5OE4iAWBB7M2zg= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD Subject: [PATCH v2 04/19] tools/xenstore: remove all watches when a domain has stopped Date: Tue, 13 Dec 2022 17:00:30 +0100 Message-Id: <20221213160045.28170-5-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221213160045.28170-1-jgross@suse.com> References: <20221213160045.28170-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1670947313591100001 Content-Type: text/plain; charset="utf-8" When a domain has been released by Xen tools, remove all its registered watches. This avoids sending watch events to the dead domain when all the nodes related to it are being removed by the Xen tools. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V2: - move call to do_release() (Julien Grall) --- tools/xenstore/xenstored_domain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_d= omain.c index aa86892fed..e669c89e94 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -740,6 +740,9 @@ int do_release(const void *ctx, struct connection *conn, if (IS_ERR(domain)) return -PTR_ERR(domain); =20 + /* Avoid triggering watch events when the domain's nodes are deleted. */ + conn_delete_all_watches(domain->conn); + talloc_free(domain->conn); =20 send_ack(conn, XS_RELEASE); --=20 2.35.3