From patchwork Wed Mar 16 16:10:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12782913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFCC2C433FE for ; Wed, 16 Mar 2022 16:10:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.291213.494157 (Exim 4.92) (envelope-from ) id 1nUWEW-0000wG-Tn; Wed, 16 Mar 2022 16:10:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 291213.494157; Wed, 16 Mar 2022 16:10:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nUWEW-0000vB-QT; Wed, 16 Mar 2022 16:10:44 +0000 Received: by outflank-mailman (input) for mailman id 291213; Wed, 16 Mar 2022 16:10:43 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nUWEV-0000RR-9D for xen-devel@lists.xenproject.org; Wed, 16 Mar 2022 16:10:43 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9434545b-a543-11ec-8eba-a37418f5ba1a; Wed, 16 Mar 2022 17:10:40 +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 CB8E4212C6; Wed, 16 Mar 2022 16:10:20 +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 930DF139B5; Wed, 16 Mar 2022 16:10:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2E2tIuwLMmK2OwAAMHmgww (envelope-from ); Wed, 16 Mar 2022 16:10:20 +0000 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: 9434545b-a543-11ec-8eba-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1647447020; 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=LgNIQyH5+Xwv5DmZji7YTH5ZmS1Ip538z39IFfnqOPE=; b=YkZYeQzdQsLlfTJZTh1fsGrn3xCSLeDEjKPXT+iJ22ANeLVauU7LwDzQG1YKHwDVBjMuli v6+rrvhB+6jbvIjuTx5mIW24tCry+Wt4Lo9gofxmHK7gg9qyjUdvEvQL/fh0zjwnsSFWDV 9NF/MowsvlBbroHve/UQV0eHK/n7eeU= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH 3/3] tools/xenstore: add documentation for extended watch command Date: Wed, 16 Mar 2022 17:10:17 +0100 Message-Id: <20220316161017.3579-4-jgross@suse.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220316161017.3579-1-jgross@suse.com> References: <20220316161017.3579-1-jgross@suse.com> MIME-Version: 1.0 Add documentation for an extension of the WATCH command used to limit the scope of watched paths. Additionally it enables to receive more information in the events related to special watches (@introduceDomain or @releaseDomain). Signed-off-by: Juergen Gross Reviewed-by: Luca Fancellu --- docs/misc/xenstore-ring.txt | 1 + docs/misc/xenstore.txt | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/misc/xenstore-ring.txt b/docs/misc/xenstore-ring.txt index 0cb72a3e35..eaa6d0a1a3 100644 --- a/docs/misc/xenstore-ring.txt +++ b/docs/misc/xenstore-ring.txt @@ -70,6 +70,7 @@ Mask Description 2 Connection error indicator (see connection error feature below) 4 GET_FEATURE and SET_FEATURE Xenstore wire commands are available 8 GET_QUOTA and SET_QUOTA Xenstore wire commands are available +16 WATCH can take a third parameter limiting its scope The "Connection state" field is used to request a ring close and reconnect. The "Connection state" field only contains valid data if the server has diff --git a/docs/misc/xenstore.txt b/docs/misc/xenstore.txt index dd75a81328..f86c6d9757 100644 --- a/docs/misc/xenstore.txt +++ b/docs/misc/xenstore.txt @@ -188,7 +188,7 @@ SET_PERMS ||+? ---------- Watches ---------- -WATCH ||? +WATCH ||[|]? Adds a watch. When a is modified (including path creation, removal, @@ -199,7 +199,11 @@ WATCH ||? matching watch results in a WATCH_EVENT message (see below). The event's path matches the watch's if it is an child - of . + of . This match can be limited by specifying (a + decimal value of 0 or larger): it denotes the directory levels + below to consider for a match ("0" would not match for + a child of , "1" would match only for a direct child, + etc.). can be a to watch or @. In the latter case may have any syntax but it matches @@ -210,7 +214,13 @@ WATCH ||? shutdown, and also on RELEASE and domain destruction events are sent to privileged callers or explicitly - via SET_PERMS enabled domains only. + via SET_PERMS enabled domains only. The semantics for a + specification of differ for generating + events: specifying "1" will report the related domid by using + @/ for the reported path. Other + values are not supported. + For @releaseDomain it is possible to watch only for a specific + domain by specifying @releaseDomain/ for the path. When a watch is first set up it is triggered once straight away, with equal to . Watches may be triggered