From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6A55C00140 for ; Tue, 26 Jul 2022 14:32:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239261AbiGZOcv (ORCPT ); Tue, 26 Jul 2022 10:32:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236260AbiGZOct (ORCPT ); Tue, 26 Jul 2022 10:32:49 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDB2532C; Tue, 26 Jul 2022 07:32:48 -0700 (PDT) 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 A215D37EFB; Tue, 26 Jul 2022 14:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1658845967; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lsmx+z/oBusYDzp7fU39ROvdgKcbPo4y7ckSVswOWzk=; b=HxBBAsWtFVAyfycssrnjYDTMniIYsSROXdSpEs3X/jBvj9faRaiOA75LODa8RZ9dziGpIj Zvi1yqZfuf6AIi+GvxTE+Qrtprr3yURaJWVDd30dBiKOPQcdG6tAx+VVeXe4my2RGo4N6f sKxTTspWLeEzTjxEM90jJfWI8vR8nK8= 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 77A6813322; Tue, 26 Jul 2022 14:32:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id nxI5HA/732JgPwAAMHmgww (envelope-from ); Tue, 26 Jul 2022 14:32:47 +0000 Date: Tue, 26 Jul 2022 16:32:46 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Tejun Heo Cc: Peter Zijlstra , John Stultz , Dmitry Shmidt , Oleg Nesterov , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH 2/3 cgroup/for-5.20] cgroup: Add "no" prefixed mount options Message-ID: <20220726143246.GA23794@blackbody.suse.cz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 14, 2022 at 06:38:43PM -1000, Tejun Heo wrote: > We allow modifying these mount options via remount. Let's add "no" prefixed > variants so that they can be turned off too. They can be turned off: > // on v5.19-rc? > :~ # grep cg /proc/mounts > cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0 > :~ # mount -t cgroup2 cgroup2 /sys/fs/cgroup/ -oremount > :~ # grep cg /proc/mounts > cgroup2 /sys/fs/cgroup cgroup2 rw,relatime 0 0 The mount(2) says about remounting: > The mountflags and data arguments should match the values used in > the original mount() call, except for those parameters that are being > deliberately changed. Or is this a provision for the fsconfig(2) API? > + fsparam_flag("memory_nolocalevents", Opt_memory_nolocalevents), > + fsparam_flag("memory_norecursiveprot", Opt_memory_norecursiveprot), These are not 'no' prefixes of the option :-) I.e. it seem more consistent to prefix whole boolean option name (in accordance with other FS options but I know limited subset of them). In the end, this should be handled generically for boolean options in the VFS and not via custom options. Also, this allows both 'nsdelegate,nonsdelegate' and 'nonsdelegate,nsdelegate' (nsdelegate is just an example) where the 'no' always overrides being a hidden implementation detail. I find this patch a bit weird. Thanks, Michal --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCYt/7CwAKCRAkDQmsBEOq uV3mAQCItCNZ+qgk+YsiePoYjqY2EogjCLrFfuM3E5vqQkJKuAD/Zz/xId+puHZe b3vUeGdCg/W5RERU4NX0miYjHXAv6gA= =F2ZO -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--