• Tycho Andersen's avatar
    cgroup: actually detect cgroupns bind mounts correctly · a4b48a2d
    Tycho Andersen authored
    Initially, the cgroupns patchset that went into the Ubuntu kernels had the
    nsroot= argument in mountopts, which allowed us to distinguish between
    cgroupfs mounts. The upstream kernel doesn't have this (the reasoning was
    that it showed up in the root field of mountinfo), so all cgroup mounts
    look idential if we don't consider the root mount, and we wrongly detect
    the mounts as bind mounts. Instead, let's remember the root path and
    compare this when considering when a mount is a bind mount.
    
    This patch is a little ugly because it intorduces cgroup specific behavior
    into the generic code, which we've thus far been able to avoid. One way to
    deal with this might be able to add a ->sb_equal hook to the fstype struct
    that could compare mountinfos' superblocks, and then fall back to
    mounts_sb_equal if that isn't present. Or we can leave this specific code
    in the generic bits until more of these appear. Either way is fine with me.
    
    v2: move the cgroup specific code to mounts_sb_equal()
    Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    a4b48a2d
Name
Last commit
Last update
..
arch Loading commit data...
include Loading commit data...
pie Loading commit data...
Makefile Loading commit data...
Makefile.config Loading commit data...
Makefile.crtools Loading commit data...
Makefile.packages Loading commit data...
action-scripts.c Loading commit data...
aio.c Loading commit data...
autofs.c Loading commit data...
bfd.c Loading commit data...
bitmap.c Loading commit data...
cgroup-props.c Loading commit data...
cgroup.c Loading commit data...
cr-check.c Loading commit data...
cr-dedup.c Loading commit data...
cr-dump.c Loading commit data...
cr-errno.c Loading commit data...
cr-exec.c Loading commit data...
cr-restore.c Loading commit data...
cr-service.c Loading commit data...
crtools.c Loading commit data...
eventfd.c Loading commit data...
eventpoll.c Loading commit data...
fault-injection.c Loading commit data...
fifo.c Loading commit data...
file-ids.c Loading commit data...
file-lock.c Loading commit data...
files-ext.c Loading commit data...
files-reg.c Loading commit data...
files.c Loading commit data...
fsnotify.c Loading commit data...
image-desc.c Loading commit data...
image.c Loading commit data...
ipc_ns.c Loading commit data...
irmap.c Loading commit data...
kcmp-ids.c Loading commit data...
kerndat.c Loading commit data...
libnetlink.c Loading commit data...
log.c Loading commit data...
lsm.c Loading commit data...
mem.c Loading commit data...
mount.c Loading commit data...
namespaces.c Loading commit data...
net.c Loading commit data...
netfilter.c Loading commit data...
page-pipe.c Loading commit data...
page-xfer.c Loading commit data...
pagemap-cache.c Loading commit data...
pagemap.c Loading commit data...
parasite-syscall.c Loading commit data...
path.c Loading commit data...
pie-util-fd.c Loading commit data...
pie-util-vdso.c Loading commit data...
pie-util.c Loading commit data...
pipes.c Loading commit data...
plugin.c Loading commit data...
proc_parse.c Loading commit data...
protobuf-desc.c Loading commit data...
protobuf.c Loading commit data...
pstree.c Loading commit data...
ptrace.c Loading commit data...
rbtree.c Loading commit data...
rst-malloc.c Loading commit data...
seccomp.c Loading commit data...
seize.c Loading commit data...
shmem.c Loading commit data...
sigframe.c Loading commit data...
signalfd.c Loading commit data...
sk-inet.c Loading commit data...
sk-netlink.c Loading commit data...
sk-packet.c Loading commit data...
sk-queue.c Loading commit data...
sk-tcp.c Loading commit data...
sk-unix.c Loading commit data...
sockets.c Loading commit data...
stats.c Loading commit data...
string.c Loading commit data...
sysctl.c Loading commit data...
sysfs_parse.c Loading commit data...
timerfd.c Loading commit data...
tty.c Loading commit data...
tun.c Loading commit data...
util.c Loading commit data...
uts_ns.c Loading commit data...
vdso.c Loading commit data...