Currently, we implement full-featured devtmpfs virtualization for VE: when a deivice is created in a VE "namespace", we send a signal to kdevtmpfs to create the devnode on devtmpfs mount corresponding to the VE. This seems to be over-complicated: all this work can be done from userspace, because we only have a hardcoded list of devices created exclusively for VE on container start. Those are tty-related stuff and mem devices, and we only need the latter to create devtmpfs nodes. Moreover, it is buggy: ve_stop_ns, which destroys VE devtmpfs mount can be called before a VE tty device is unregistered, resulting in a KP:
https://jira.sw.ru/browse/PSBM-35077 This patch therefore simplifies it. It makes the kernel only provide a single empty tmpfs mount per VE, which appears on an attempt to mount devtmpfs from inside a VE. The content of the fs is to be filled by the userspace on container start, which will be done in the scope of https://jira.sw.ru/browse/PSBM-35146 Vladimir Davydov (6): Revert "ve/devtmpfs: Create required devices on container startup" Revert "ve/devtmpfs: pass proper options string" Revert "devtmpfs: containerize it with new obj ns operation" Revert "fs: add data pointer to mount_ns()" Revert "devtmpfs: per-VE mounts introduced" devtmpfs: lightweight virtualization drivers/base/devtmpfs.c | 127 +++++++++++++++++++++++---------------------- drivers/char/mem.c | 20 ------- fs/binfmt_misc.c | 2 +- fs/nfsd/nfsctl.c | 2 +- fs/super.c | 4 +- fs/sysfs/ve.c | 9 ---- include/linux/device.h | 4 -- include/linux/fs.h | 2 +- include/linux/kobject_ns.h | 2 - include/linux/ve.h | 4 +- ipc/mqueue.c | 2 +- kernel/ve/ve.c | 68 ++---------------------- net/sunrpc/rpc_pipe.c | 2 +- 13 files changed, 78 insertions(+), 170 deletions(-) -- 2.1.4 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
