From: Tejun Heo <tj@kernel.org>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
John Stultz <john.stultz@linaro.org>,
Dmitry Shmidt <dimitrysh@google.com>,
Oleg Nesterov <oleg@redhat.com>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Subject: Re: [PATCH 2/3 cgroup/for-5.20] cgroup: Add "no" prefixed mount options
Date: Tue, 26 Jul 2022 13:30:40 -1000 [thread overview]
Message-ID: <YuB5ICv3bXsy5Xuh@slm.duckdns.org> (raw)
In-Reply-To: <YuBIACfZDk72yjI3@slm.duckdns.org>
Hello,
On Tue, Jul 26, 2022 at 10:01:04AM -1000, Tejun Heo wrote:
> On Tue, Jul 26, 2022 at 04:32:46PM +0200, Michal Koutný wrote:
> > On Thu, Jul 14, 2022 at 06:38:43PM -1000, Tejun Heo <tj@kernel.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
root@test ~# grep cgroup /proc/mounts
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
root@test ~# mount -o remount,exec /sys/fs/cgroup
root@test ~# grep cgroup /proc/mounts
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,relatime,nsdelegate,memory_recursiveprot 0 0
root@test ~# mount -o remount /sys/fs/cgroup
root@test ~# grep cgroup /proc/mounts
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,relatime,nsdelegate,memory_recursiveprot 0 0
root@test ~# mount -o remount,nsdelegate,memory_recursiveprot cgroup2 /sys/fs/cgroup
root@test ~# grep cgroup /proc/mounts
cgroup2 /sys/fs/cgroup cgroup2 rw,relatime,nsdelegate,memory_recursiveprot 0 0
root@test ~# mount -o remount,memory_recursiveprot cgroup2 /sys/fs/cgroup
root@test ~# grep cgroup /proc/mounts
cgroup2 /sys/fs/cgroup cgroup2 rw,relatime,memory_recursiveprot 0 0
root@test ~# mount -o remount cgroup2 /sys/fs/cgroup
root@test ~# grep cgroup /proc/mounts
cgroup2 /sys/fs/cgroup cgroup2 rw,relatime 0 0
Man, I had no idea that `mount -o remount,$OPTS $MOUNT_POINT` and `mount -o
remount,$OPTS $SRC $MOUNT_POINT` behave completely differently in how they
handle existing options. I wonder why other filesystems are implementing
explicit no prefixed options.
Anyways, will soon post a patch to remove the no prefixed options.
Thanks for pointing it out.
--
tejun
next prev parent reply other threads:[~2022-07-26 23:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 4:38 [PATCH 1/3 cgroup/for-5.20] cgroup: Elide write-locking threadgroup_rwsem when updating csses on an empty subtree Tejun Heo
[not found] ` <YtDvN0wJ6CKaEPN8-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-07-15 4:38 ` [PATCH 2/3 cgroup/for-5.20] cgroup: Add "no" prefixed mount options Tejun Heo
[not found] ` <YtDvU4jRPSsarcNp-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-07-15 4:39 ` [PATCH 3/3 cgroup/for-5.20] cgroup: Make !percpu threadgroup_rwsem operations optional Tejun Heo
2022-07-23 5:12 ` Tejun Heo
2022-07-23 14:28 ` [PATCH RESEND " Tejun Heo
[not found] ` <YtwFjPnCtw8ySnuv-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-07-25 12:12 ` Oleg Nesterov
[not found] ` <20220725121208.GB28662-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2022-07-26 23:14 ` Tejun Heo
2022-07-27 17:39 ` Oleg Nesterov
2022-07-25 14:16 ` Christian Brauner
2022-07-26 14:32 ` Michal Koutný
[not found] ` <20220726143257.GA23882-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-07-26 17:33 ` Tejun Heo
2022-07-26 14:32 ` [PATCH 2/3 cgroup/for-5.20] cgroup: Add "no" prefixed mount options Michal Koutný
[not found] ` <20220726143246.GA23794-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-07-26 20:01 ` Tejun Heo
2022-07-26 23:30 ` Tejun Heo [this message]
[not found] ` <YuB5ICv3bXsy5Xuh-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-07-26 23:48 ` [PATCH cgroup/for-5.20] cgroup: remove "no" prefixed mount options options Tejun Heo
[not found] ` <YuB9QXapVUy1t8TZ-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-07-27 9:27 ` Michal Koutný
[not found] ` <20220727092715.GA1569-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-07-27 17:55 ` Tejun Heo
2022-07-26 14:31 ` [PATCH 1/3 cgroup/for-5.20] cgroup: Elide write-locking threadgroup_rwsem when updating csses on an empty subtree Michal Koutný
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YuB5ICv3bXsy5Xuh@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=dimitrysh@google.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox