Issue with mount options on mount/umount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

It seems that if 'umount' happens before some cgroup cleanup processes finish, we will not be able to mount this cgroup with changed options.

For example, consider this test case (where I'm playing with noprefix):

#!/bin/sh

mkdir /tmp/bla
mkdir /dev/cgroup

mount -t cgroup -o cpuset,noprefix bla /dev/cgroup
mkdir /dev/cgroup/ltp
rmdir /dev/cgroup/ltp

#sleep 1

umount /dev/cgroup
rmdir /dev/cgroup

for i in $(seq 2); do
    echo $i
    echo $i > /dev/kmsg
mount -t cgroup -o cpuset bla /tmp/bla; ls /tmp/bla | grep effective_cpus; umount /tmp/bla
done

rmdir /tmp/bla

If it's executed as is, it reports:

[root@ol6-x64 cgroup]# ./test.sh
1
effective_cpus
2
cpuset.effective_cpus

and in dmesg:

[root@ol6-x64 cgroup]# dmesg|tail
1
cgroup: new mount options do not match the existing superblock, will be ignored
2

If we uncomment that 'sleep 1' the test will report cpuset.effective_cpus for both the iterations.

The kernel is v4.5-rc7-159-g7f02bf6. However, this issue is applicable to older versions as well.

Is this behavior a bug or feature? If it's a feature, then what is the motivation for this behavior?

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux