From nobody Mon May 20 23:14:56 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=1700566885; cv=none; d=zohomail.com; s=zohoarc; b=V7a390xB+9xbvmmPVJZDvo870harsIKg6cbgfQFxiGJ9/Z8m9UKCzY1bdvfQzsPTFZzfSvUzc9V0BkSg5wJtuspEDQDODCabYGFu4uIi9D+Yz4an8EgGbniE3TRCax9Ir10puru9BfrhweWZ0tL+qvSlo6qmBL+qXc0I7U/NywU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700566885; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3kffZ5HEaRzPIhSAhjp1pFj/sXobLeFjpgKZB+hLBr4=; b=VEZipJH8BDBjT+Z+Hwnjl6n0KO4QbSHNKYVnNWBEXTMoSpDTkAImuK89MLJ/RLJgj4F1xuGgUInqbdUPnx/+FY202DWoFLAuuCo42GcNc3WV5vdUSQ+BeARIWeARLu6zlW+yujwB3rTxQk+REWsVLG14RmQ8W7eKBppKdNNKnK4= 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 1700566885268964.0399404770056; Tue, 21 Nov 2023 03:41:25 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.637748.993771 (Exim 4.92) (envelope-from ) id 1r5P7k-00042X-Ez; Tue, 21 Nov 2023 11:41:00 +0000 Received: by outflank-mailman (output) from mailman id 637748.993771; Tue, 21 Nov 2023 11:41:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r5P7k-00042O-Ah; Tue, 21 Nov 2023 11:41:00 +0000 Received: by outflank-mailman (input) for mailman id 637748; Tue, 21 Nov 2023 11:40:59 +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 1r5P7j-00041h-0A for xen-devel@lists.xenproject.org; Tue, 21 Nov 2023 11:40:59 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d6032bb1-8862-11ee-98e1-6d05b1d4d9a1; Tue, 21 Nov 2023 12:40:57 +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-out2.suse.de (Postfix) with ESMTPS id 43D6A1F8BD; Tue, 21 Nov 2023 11:40:56 +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 14154138E3; Tue, 21 Nov 2023 11:40:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id y5GFA0iXXGUTdAAAMHmgww (envelope-from ); Tue, 21 Nov 2023 11:40:56 +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: d6032bb1-8862-11ee-98e1-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700566856; 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=3kffZ5HEaRzPIhSAhjp1pFj/sXobLeFjpgKZB+hLBr4=; b=VwCJsnSN0JL+V5uN5KeTb6BHohyex6hn1ExTYCjDQfgLxoYXV6NOxR3FlZX0U8uqKQVQDA B4qDzPuWsQqgoMdxGqaPRy9xkVYwQoiQWrLeh1ClWZVm7TTjGq1glG9FF3ldwqV82pB+XT ZK/r4a6h+yBnDyjF/vjUuL8I9rnu/Gg= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD , Julien Grall Subject: [PATCH v2 1/5] tools/xenstored: remove "-D" command line parameter Date: Tue, 21 Nov 2023 12:40:44 +0100 Message-Id: <20231121114048.31294-2-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231121114048.31294-1-jgross@suse.com> References: <20231121114048.31294-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1700566885791100001 Content-Type: text/plain; charset="utf-8" Remove the "-D" command parameter, which is disabling initialization of the mandatory domain data handling. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstored/core.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index 311764eb0c..3465b7ecf1 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c @@ -2661,7 +2661,6 @@ static void usage(void) "\n" "where options may include:\n" "\n" -" -D, --no-domain-init to state that xenstored should not initialise d= om0,\n" " -F, --pid-file giving a file for the daemon's pid to be writte= n,\n" " -H, --help to output this message,\n" " -N, --no-fork to request that the daemon does not fork,\n" @@ -2708,7 +2707,6 @@ static void usage(void) =20 =20 static struct option options[] =3D { - { "no-domain-init", 0, NULL, 'D' }, { "entry-nb", 1, NULL, 'E' }, { "pid-file", 1, NULL, 'F' }, { "event", 1, NULL, 'e' }, @@ -2841,7 +2839,6 @@ int main(int argc, char *argv[]) int sock_pollfd_idx =3D -1; bool dofork =3D true; bool outputpid =3D false; - bool no_domain_init =3D false; bool live_update =3D false; const char *pidfile =3D NULL; int timeout; @@ -2850,12 +2847,9 @@ int main(int argc, char *argv[]) orig_argv =3D argv; =20 while ((opt =3D getopt_long(argc, argv, - "DE:F:H::KNPS:t:A:M:Q:q:T:RVW:w:U", + "E:F:H::KNPS:t:A:M:Q:q:T:RVW:w:U", options, NULL)) !=3D -1) { switch (opt) { - case 'D': - no_domain_init =3D true; - break; case 'E': hard_quotas[ACC_NODES].val =3D get_optval_uint(optarg); break; @@ -2964,7 +2958,7 @@ int main(int argc, char *argv[]) init_pipe(reopen_log_pipe); =20 /* Listen to hypervisor. */ - if (!no_domain_init && !live_update) { + if (!live_update) { domain_init(-1); dom0_init(); } --=20 2.35.3 From nobody Mon May 20 23:14:56 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=1700566882; cv=none; d=zohomail.com; s=zohoarc; b=d5BhCbe4i3TsHVRBs2kC5tQFL6q4tTpdd7s/e+YBUE1VCZSNgEm8k++Ixs9Qldpo5xwUauw14Hzh8/IcUHT2o+UGZGYyMfMyDsqCqnqKr+ZrE/T8rd439zmcMZCTTO1nnlzurNdUp4HjWPcsjWK2G2CGaWLOUTtfkm0lTIiTtjE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700566882; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ixUKxwXwvgJI13MFOVkZeKVDZtbxXeO2DXr+/EHH4pk=; b=AqjvAI+V/OD0l6xZNUBPgQBJ/whWvqbRrp2fy3YAgf5pD1m9F7KEFI8KG63+DZqnxElgioLGFLwWJ7U3ToNhBU/il+Twfs4rLZwLvf5UkQXFfbNYQ6FQkiEKbVq2cdztBX45nC6JdEz4sX5e39IoTXdc3Yo8Cn/IiHWaiaPL61s= 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 1700566882781253.27250979067878; Tue, 21 Nov 2023 03:41:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.637749.993781 (Exim 4.92) (envelope-from ) id 1r5P7o-0004KV-OC; Tue, 21 Nov 2023 11:41:04 +0000 Received: by outflank-mailman (output) from mailman id 637749.993781; Tue, 21 Nov 2023 11:41:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r5P7o-0004KO-LE; Tue, 21 Nov 2023 11:41:04 +0000 Received: by outflank-mailman (input) for mailman id 637749; Tue, 21 Nov 2023 11:41:02 +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 1r5P7m-00041h-OV for xen-devel@lists.xenproject.org; Tue, 21 Nov 2023 11:41:02 +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 d8c5c014-8862-11ee-98e1-6d05b1d4d9a1; Tue, 21 Nov 2023 12:41:02 +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 E633D218B5; Tue, 21 Nov 2023 11:41:01 +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 A84FE138E3; Tue, 21 Nov 2023 11:41:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id swa/J02XXGUhdAAAMHmgww (envelope-from ); Tue, 21 Nov 2023 11:41:01 +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: d8c5c014-8862-11ee-98e1-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700566861; 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=ixUKxwXwvgJI13MFOVkZeKVDZtbxXeO2DXr+/EHH4pk=; b=ffLet7GrL/rEYuhg/59te0ik6SbvshhL4c958B5cyyXDm7iAPHl4VwYaWcpyDQuEEWJU8P 30QUKTQun4UuTRpeWTjsO8+XHhg5tI9X7mVfA+SzECMEBjaB0qCxOu3skfqbg5+neTghpj GspJTEabEIdCjU6uV4b+mp0HIp+x/MA= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD , Julien Grall Subject: [PATCH v2 2/5] tools/xenstored: remove "-V" command line option Date: Tue, 21 Nov 2023 12:40:45 +0100 Message-Id: <20231121114048.31294-3-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231121114048.31294-1-jgross@suse.com> References: <20231121114048.31294-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1700566883660100001 Content-Type: text/plain; charset="utf-8" The "-V" (verbose) command line option is nearly completely redundant with "io" tracing. Just the time of the printed data is a little bit different, while the tracing is more informative. Remove the verbose option. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstored/core.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index 3465b7ecf1..194e24238b 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c @@ -76,7 +76,6 @@ static int sock =3D -1; int orig_argc; char **orig_argv; =20 -static bool verbose =3D false; LIST_HEAD(connections); int tracefd =3D -1; static bool recovery =3D true; @@ -329,11 +328,6 @@ static bool write_messages(struct connection *conn) return true; =20 if (out->inhdr) { - if (verbose) - xprintf("Writing msg %s (%.*s) out to %p\n", - sockmsg_string(out->hdr.msg.type), - out->hdr.msg.len, - out->buffer, conn); ret =3D conn->funcs->write(conn, out->hdr.raw + out->used, sizeof(out->hdr) - out->used); if (ret < 0) @@ -2134,11 +2128,6 @@ static bool process_delayed_message(struct delayed_r= equest *req) =20 static void consider_message(struct connection *conn) { - if (verbose) - xprintf("Got message %s len %i from %p\n", - sockmsg_string(conn->in->hdr.msg.type), - conn->in->hdr.msg.len, conn); - conn->is_stalled =3D false; /* * Currently, Live-Update is not supported if there is active @@ -2701,8 +2690,7 @@ static void usage(void) " -R, --no-recovery to request that no recovery should be attempted= when\n" " the store is corrupted (debug only),\n" " -K, --keep-orphans don't delete nodes owned by a domain when the\n" -" domain is deleted (this is a security risk!)\n" -" -V, --verbose to request verbose execution.\n"); +" domain is deleted (this is a security risk!)\n"= ); } =20 =20 @@ -2726,7 +2714,6 @@ static struct option options[] =3D { { "timeout", 1, NULL, 'w' }, { "no-recovery", 0, NULL, 'R' }, { "keep-orphans", 0, NULL, 'K' }, - { "verbose", 0, NULL, 'V' }, { "watch-nb", 1, NULL, 'W' }, #ifndef NO_LIVE_UPDATE { "live-update", 0, NULL, 'U' }, @@ -2847,7 +2834,7 @@ int main(int argc, char *argv[]) orig_argv =3D argv; =20 while ((opt =3D getopt_long(argc, argv, - "E:F:H::KNPS:t:A:M:Q:q:T:RVW:w:U", + "E:F:H::KNPS:t:A:M:Q:q:T:RW:w:U", options, NULL)) !=3D -1) { switch (opt) { case 'E': @@ -2884,9 +2871,6 @@ int main(int argc, char *argv[]) case 'K': keep_orphans =3D true; break; - case 'V': - verbose =3D true; - break; case 'W': hard_quotas[ACC_WATCH].val =3D get_optval_uint(optarg); break; --=20 2.35.3 From nobody Mon May 20 23:14:56 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=1700566894; cv=none; d=zohomail.com; s=zohoarc; b=EIcLzEM0x1Q4PVgfgJtd2Ye95haIWI5GEuykYMk0xJrnJN5zLAHOOLsulBB8v6wDjJnUPDqPbXNy+1+U7iq8Kr5LYJDGjWY5KgnYqoJ2UzvHiki1s0zPP9SJCHzxAnnyOI6ozopCDBYe1xiXf2GyvzKdKg47JyED7TNo+fyk6+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700566894; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KvlJrXDiW9tZqlu8RFLLAE1oGWnA1kYBF6QNlBpYHK8=; b=F9AvFSRJFf9BITwTSzt6sMt4SMUx4Y7ySBGzd32Fu+L5DFzg6349Xf5EX8ua7ZeearTpei5EXr1aEs16eitWimVqnuZYonQ2Q36jvlFvj6Jc9R9s8inAp+6DLulcIEbfKF4dsE3hVPaUvi57qoAgN+Qww6Md6itDp97hBqamOzo= 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 1700566894381583.4148279730366; Tue, 21 Nov 2023 03:41:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.637750.993791 (Exim 4.92) (envelope-from ) id 1r5P7t-0004er-VH; Tue, 21 Nov 2023 11:41:09 +0000 Received: by outflank-mailman (output) from mailman id 637750.993791; Tue, 21 Nov 2023 11:41:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r5P7t-0004ei-SC; Tue, 21 Nov 2023 11:41:09 +0000 Received: by outflank-mailman (input) for mailman id 637750; Tue, 21 Nov 2023 11:41:08 +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 1r5P7s-00041h-9O for xen-devel@lists.xenproject.org; Tue, 21 Nov 2023 11:41:08 +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 dc2193b8-8862-11ee-98e1-6d05b1d4d9a1; Tue, 21 Nov 2023 12:41:07 +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 8B38121923; Tue, 21 Nov 2023 11:41:07 +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 54EED138E3; Tue, 21 Nov 2023 11:41:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HSuRE1OXXGUvdAAAMHmgww (envelope-from ); Tue, 21 Nov 2023 11:41:07 +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: dc2193b8-8862-11ee-98e1-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700566867; 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=KvlJrXDiW9tZqlu8RFLLAE1oGWnA1kYBF6QNlBpYHK8=; b=VxdGkqvuPNJlmjlQX3kaFIMfrMl7iNwUyfITgCky8ixUQquY5jBaz9zJZ8+1ag9g5a261G wdL9xFV+SmrI1ZV3lZl8vD0D/mqseJEoqDsuUpB9A+BeyEtNvNDikK7bVUlBmAXE5bTLBQ CIWw/Qn1KQDnqVnOB4OkL+AeM5PvJRg= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD , Julien Grall Subject: [PATCH v2 3/5] tools/xenstored: remove the "-P" command line option Date: Tue, 21 Nov 2023 12:40:46 +0100 Message-Id: <20231121114048.31294-4-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231121114048.31294-1-jgross@suse.com> References: <20231121114048.31294-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[15.98%] X-Spam-Flag: NO X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1700566895864100001 Content-Type: text/plain; charset="utf-8" The "-P" command line option just results in printing the PID of the xenstored daemon to stdout before stdout is being closed. The same information can be retrieved from the PID file via the "-F" option. Remove the redundant "-P" option. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstored/core.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index 194e24238b..3ce50b313b 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c @@ -2653,7 +2653,6 @@ static void usage(void) " -F, --pid-file giving a file for the daemon's pid to be writte= n,\n" " -H, --help to output this message,\n" " -N, --no-fork to request that the daemon does not fork,\n" -" -P, --output-pid to request that the pid of the daemon is output= ,\n" " -T, --trace-file giving the file for logging, and\n" " --trace-control=3D+ activate a specific \n" " --trace-control=3D- deactivate a specific \n" @@ -2702,7 +2701,6 @@ static struct option options[] =3D { { "help", 0, NULL, 'H' }, { "no-fork", 0, NULL, 'N' }, { "priv-domid", 1, NULL, 'p' }, - { "output-pid", 0, NULL, 'P' }, { "entry-size", 1, NULL, 'S' }, { "trace-file", 1, NULL, 'T' }, { "trace-control", 1, NULL, 1 }, @@ -2825,7 +2823,6 @@ int main(int argc, char *argv[]) int opt; int sock_pollfd_idx =3D -1; bool dofork =3D true; - bool outputpid =3D false; bool live_update =3D false; const char *pidfile =3D NULL; int timeout; @@ -2834,7 +2831,7 @@ int main(int argc, char *argv[]) orig_argv =3D argv; =20 while ((opt =3D getopt_long(argc, argv, - "E:F:H::KNPS:t:A:M:Q:q:T:RW:w:U", + "E:F:H::KNS:t:A:M:Q:q:T:RW:w:U", options, NULL)) !=3D -1) { switch (opt) { case 'E': @@ -2849,9 +2846,6 @@ int main(int argc, char *argv[]) case 'N': dofork =3D false; break; - case 'P': - outputpid =3D true; - break; case 'R': recovery =3D false; break; @@ -2947,11 +2941,6 @@ int main(int argc, char *argv[]) dom0_init(); } =20 - if (outputpid) { - printf("%ld\n", (long)getpid()); - fflush(stdout); - } - /* redirect to /dev/null now we're ready to accept connections */ if (dofork && !live_update) finish_daemonize(); --=20 2.35.3 From nobody Mon May 20 23:14:56 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=1700566894; cv=none; d=zohomail.com; s=zohoarc; b=IolXNFw+6dqFDiq9xZ0WPqXAg8C/5Fu6z+4S0ptHqZoYTKid4HkyrMaFtV7EgFEMYpfruD3w8YEjsl+awnWHFskvYUBeG3ChzVW76L24UJ+1U4UB0v7JTJR4xRiFGfwIznPoMG8NTScCEC2GsLfPKuUN4ekLkVfKzXEFiaMRlFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700566894; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=heCKLHEovjITn1/bJzQ4zeWzaVwCVa71/Mq7z/0Cys8=; b=J3hD3G3ZjDYjKm//fxBVErwBUe65CCisBnjt54rPtdHHvPMD4/gAlmT2UTqAjL6k84pbG6YMbAs6eNWyqBNffHG0d9Zk8OjGSqyUg/Tr5bjmwc1uW7oWpWGt4P4Pi7XQSqohyRk35UPc+XFZFQEFvabvjWZYdzKXRfwf8CayTm0= 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 1700566894191217.31523347692325; Tue, 21 Nov 2023 03:41:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.637751.993801 (Exim 4.92) (envelope-from ) id 1r5P7z-00056E-7e; Tue, 21 Nov 2023 11:41:15 +0000 Received: by outflank-mailman (output) from mailman id 637751.993801; Tue, 21 Nov 2023 11:41:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r5P7z-000558-49; Tue, 21 Nov 2023 11:41:15 +0000 Received: by outflank-mailman (input) for mailman id 637751; Tue, 21 Nov 2023 11:41:14 +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 1r5P7x-00041h-Uy for xen-devel@lists.xenproject.org; Tue, 21 Nov 2023 11:41:13 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id df7a62ef-8862-11ee-98e1-6d05b1d4d9a1; Tue, 21 Nov 2023 12:41:13 +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-out2.suse.de (Postfix) with ESMTPS id 1CF1E1F8B8; Tue, 21 Nov 2023 11:41:13 +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 E3B66138E3; Tue, 21 Nov 2023 11:41:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hVs+NliXXGU4dAAAMHmgww (envelope-from ); Tue, 21 Nov 2023 11:41:12 +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: df7a62ef-8862-11ee-98e1-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700566873; 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=heCKLHEovjITn1/bJzQ4zeWzaVwCVa71/Mq7z/0Cys8=; b=tvAg9wARHDX6VxzWVocu3dRql4BsGfqgKwpTX6RSve6Djww5cLhGYcphpKzpcnWKmRoDeV yi8rAupjDiLaZk3nNTT7L7Ln/bt4dROHuEkCLOAVYvXbDY1xflkfpFPNjDnP8l2WXDSeGJ JrYDu5tq6UcFTqFcPk5sc7TyWqO6u0o= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD , Julien Grall Subject: [PATCH v2 4/5] tools/xenstored: remove the "-R" command line option Date: Tue, 21 Nov 2023 12:40:47 +0100 Message-Id: <20231121114048.31294-5-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231121114048.31294-1-jgross@suse.com> References: <20231121114048.31294-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -3.30 X-Spamd-Result: default: False [-3.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1700566895877100002 Content-Type: text/plain; charset="utf-8" The "-R" (no recovery) command line option enables to omit fixing the node store in case of detected inconsistencies. This might have been of interest in the past, when the node data base was kept in a file, but now the usability of this option is zero. Remove the "-R" option. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstored/core.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index 3ce50b313b..43be89c4fc 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c @@ -78,7 +78,6 @@ char **orig_argv; =20 LIST_HEAD(connections); int tracefd =3D -1; -static bool recovery =3D true; bool keep_orphans =3D false; static int reopen_log_pipe[2]; static int reopen_log_pipe0_pollfd_idx =3D -1; @@ -2443,9 +2442,6 @@ int remember_string(struct hashtable *hash, const cha= r *str) * have a corresponding child node (and if so, delete them). Each valid c= hild * is then recursively checked. * - * No deleting is performed if the recovery flag is cleared (i.e. -R was - * passed on the command line). - * * As we go, we record each node in the given reachable hashtable. These * entries will be used later in clean_store. */ @@ -2462,8 +2458,7 @@ static int check_store_step(const void *ctx, struct c= onnection *conn, =20 if (hashtable_search(data->reachable, (void *)node->name)) { log("check_store: '%s' is duplicated!", node->name); - return recovery ? WALK_TREE_RM_CHILDENTRY - : WALK_TREE_SKIP_CHILDREN; + return WALK_TREE_RM_CHILDENTRY; } =20 if (remember_string(data->reachable, node->name)) @@ -2479,7 +2474,7 @@ static int check_store_enoent(const void *ctx, struct= connection *conn, { log("check_store: node '%s' not found", name); =20 - return recovery ? WALK_TREE_RM_CHILDENTRY : WALK_TREE_OK; + return WALK_TREE_RM_CHILDENTRY; } =20 =20 @@ -2504,8 +2499,7 @@ static int clean_store_(const void *key, void *val, v= oid *private) } if (!hashtable_search(reachable, name)) { log("clean_store: '%s' is orphaned!", name); - if (recovery) - db_delete(NULL, name, NULL); + db_delete(NULL, name, NULL); } =20 talloc_free(name); @@ -2686,8 +2680,6 @@ static void usage(void) " -w, --timeout =3D set the timeout in seconds for ,\n" " allowed timeout candidates are:\n" " watch-event: time a watch-event is kept pending= \n" -" -R, --no-recovery to request that no recovery should be attempted= when\n" -" the store is corrupted (debug only),\n" " -K, --keep-orphans don't delete nodes owned by a domain when the\n" " domain is deleted (this is a security risk!)\n"= ); } @@ -2710,7 +2702,6 @@ static struct option options[] =3D { { "quota", 1, NULL, 'Q' }, { "quota-soft", 1, NULL, 'q' }, { "timeout", 1, NULL, 'w' }, - { "no-recovery", 0, NULL, 'R' }, { "keep-orphans", 0, NULL, 'K' }, { "watch-nb", 1, NULL, 'W' }, #ifndef NO_LIVE_UPDATE @@ -2831,7 +2822,7 @@ int main(int argc, char *argv[]) orig_argv =3D argv; =20 while ((opt =3D getopt_long(argc, argv, - "E:F:H::KNS:t:A:M:Q:q:T:RW:w:U", + "E:F:H::KNS:t:A:M:Q:q:T:W:w:U", options, NULL)) !=3D -1) { switch (opt) { case 'E': @@ -2846,9 +2837,6 @@ int main(int argc, char *argv[]) case 'N': dofork =3D false; break; - case 'R': - recovery =3D false; - break; case 'S': hard_quotas[ACC_NODESZ].val =3D get_optval_uint(optarg); break; --=20 2.35.3 From nobody Mon May 20 23:14:56 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=1700566903; cv=none; d=zohomail.com; s=zohoarc; b=Svumvwy5on69ZxgpwlWiaandn08jd3o3r8B9IES/M6SNmKoVTfAj0wqUEF8FKM/67asBwDcI8SxC5whol8wv5Y8T4ZKVlS4FQAgBACmv76zaXSkDA7U2w6YmKCWprZkGr+ony3g7yR6v55ChecYWyJHRn+L/iMBxDgrw1drIExE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700566903; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QJ2+NXd89caogZEaF0ZqIYFijCKoRqJHe0UD7PTMHYc=; b=HJnYzG5zqNIy/9PhGo1KzVWq5mmIfRJAFzwB24bW0IVbJqSgdXYKYA4FM7GHznHdFvJLqVJ82uNYBe490D/5G6ZPrhYvGBOaQw3sUUdsNxo7nRrFekC6Cesu/M+Dsaay6r1i45/fLK/O2EME2wa1bZHN0FvNQH/uK76JkxqlxUU= 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 1700566903112974.4555416479269; Tue, 21 Nov 2023 03:41:43 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.637756.993811 (Exim 4.92) (envelope-from ) id 1r5P85-0005Yz-HP; Tue, 21 Nov 2023 11:41:21 +0000 Received: by outflank-mailman (output) from mailman id 637756.993811; Tue, 21 Nov 2023 11:41:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r5P85-0005Yn-DQ; Tue, 21 Nov 2023 11:41:21 +0000 Received: by outflank-mailman (input) for mailman id 637756; Tue, 21 Nov 2023 11:41:20 +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 1r5P83-00041h-UK for xen-devel@lists.xenproject.org; Tue, 21 Nov 2023 11:41:19 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [2001:67c:2178:6::1c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e2d1a7a6-8862-11ee-98e1-6d05b1d4d9a1; Tue, 21 Nov 2023 12:41:19 +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 B9A96218F2; Tue, 21 Nov 2023 11:41:18 +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 82BEF138E3; Tue, 21 Nov 2023 11:41:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uB6RHl6XXGVOdAAAMHmgww (envelope-from ); Tue, 21 Nov 2023 11:41:18 +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: e2d1a7a6-8862-11ee-98e1-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700566878; 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=QJ2+NXd89caogZEaF0ZqIYFijCKoRqJHe0UD7PTMHYc=; b=jtADvQ6zfkEcbVv5+hh18xK8b2WKli5edwLx66fXpH+4W/U6GzJIGcC3N9CXFnZ+MjgOXM ZuIiEaMTR8UhxkhUAhLwz+IJYjuiURGBgUQN93BlaaEhSkZZagk6nRtAAdVF9w8qTifMhO L1mc+aRECbRCthf3k/DbkZMUKYP/x2s= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD Subject: [PATCH v2 5/5] tools/xenstored: remove "-N" command line option Date: Tue, 21 Nov 2023 12:40:48 +0100 Message-Id: <20231121114048.31294-6-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231121114048.31294-1-jgross@suse.com> References: <20231121114048.31294-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -3.30 X-Spamd-Result: default: False [-3.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1700566904034100001 Content-Type: text/plain; charset="utf-8" The "-N" (do not daemonize) command line option is of questionable use: its sole purpose seems to be to aid debugging of xenstored by making it easier to start xenstored under gdb, or to see any debug messages easily. Debug messages can as well be sent to syslog(), while gdb can be attached to the daemon easily. The only not covered case is an error while initializing xenstored, but this could be handled e.g. by saving a core dump, which can be analyzed later. The call of talloc_enable_leak_report_full() done only with "-N" specified is no longer needed, as the same can be achieved via "xenstore-control memreport". Signed-off-by: Juergen Gross --- Slightly RFC, as this is making debugging a little bit harder in specific cases. OTOH I didn't use this option since years, in spite of having done a _lot_ of xenstore hacking. Signed-off-by: Juergen Gross --- tools/xenstored/core.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index 43be89c4fc..f5766452fe 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c @@ -2646,7 +2646,6 @@ static void usage(void) "\n" " -F, --pid-file giving a file for the daemon's pid to be writte= n,\n" " -H, --help to output this message,\n" -" -N, --no-fork to request that the daemon does not fork,\n" " -T, --trace-file giving the file for logging, and\n" " --trace-control=3D+ activate a specific \n" " --trace-control=3D- deactivate a specific \n" @@ -2691,7 +2690,6 @@ static struct option options[] =3D { { "event", 1, NULL, 'e' }, { "master-domid", 1, NULL, 'm' }, { "help", 0, NULL, 'H' }, - { "no-fork", 0, NULL, 'N' }, { "priv-domid", 1, NULL, 'p' }, { "entry-size", 1, NULL, 'S' }, { "trace-file", 1, NULL, 'T' }, @@ -2813,7 +2811,6 @@ int main(int argc, char *argv[]) { int opt; int sock_pollfd_idx =3D -1; - bool dofork =3D true; bool live_update =3D false; const char *pidfile =3D NULL; int timeout; @@ -2822,7 +2819,7 @@ int main(int argc, char *argv[]) orig_argv =3D argv; =20 while ((opt =3D getopt_long(argc, argv, - "E:F:H::KNS:t:A:M:Q:q:T:W:w:U", + "E:F:H::KS:t:A:M:Q:q:T:W:w:U", options, NULL)) !=3D -1) { switch (opt) { case 'E': @@ -2834,9 +2831,6 @@ int main(int argc, char *argv[]) case 'H': usage(); return 0; - case 'N': - dofork =3D false; - break; case 'S': hard_quotas[ACC_NODESZ].val =3D get_optval_uint(optarg); break; @@ -2899,18 +2893,13 @@ int main(int argc, char *argv[]) /* Errors ignored here, will be reported when we open files */ mkdir(xenstore_daemon_rundir(), 0755); =20 - if (dofork) { - openlog("xenstored", 0, LOG_DAEMON); - if (!live_update) - daemonize(); - } + openlog("xenstored", 0, LOG_DAEMON); + if (!live_update) + daemonize(); + if (pidfile) write_pidfile(pidfile); =20 - /* Talloc leak reports go to stderr, which is closed if we fork. */ - if (!dofork) - talloc_enable_leak_report_full(); - /* Don't kill us with SIGPIPE. */ signal(SIGPIPE, SIG_IGN); =20 @@ -2930,11 +2919,10 @@ int main(int argc, char *argv[]) } =20 /* redirect to /dev/null now we're ready to accept connections */ - if (dofork && !live_update) + if (!live_update) finish_daemonize(); #ifndef __MINIOS__ - if (dofork) - xprintf =3D trace; + xprintf =3D trace; #endif =20 signal(SIGHUP, trigger_reopen_log); --=20 2.35.3