[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220726143246.GA23794@blackbody.suse.cz>
Date: Tue, 26 Jul 2022 16:32:46 +0200
From: Michal Koutný <mkoutny@...e.com>
To: Tejun Heo <tj@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
John Stultz <john.stultz@...aro.org>,
Dmitry Shmidt <dimitrysh@...gle.com>,
Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org
Subject: Re: [PATCH 2/3 cgroup/for-5.20] cgroup: Add "no" prefixed mount
options
On Thu, Jul 14, 2022 at 06:38:43PM -1000, Tejun Heo <tj@...nel.org> 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
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists