The commit is pushed to "branch-rh7-3.10.0-229.7.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-229.7.2.vz7.6.3 ------> commit 8d9d5a10d874b4d9f66f1af3fdcabbe9aee396f2 Author: Vladimir Davydov <vdavy...@parallels.com> Date: Fri Aug 28 16:10:58 2015 +0400
Revert "fs: add data pointer to mount_ns()" Patchset description: Rework devtmpfs virtualization Currently, we implement full-featured devtmpfs virtualization for VE: when a device 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 Reviewed-by: Cyrill Gorcunov <gorcu...@virtuozzo.com> === This patch description: This reverts commit 69e6ae7f750fc862c9324441130abbff2c8b528e. This is only needed for per-ns filesystems that can accept user options. There is the only such a filesystem, devtmpfs, which we made per container. Since devtmpfs virtualization is going to be dropped, this patch is not necessary. Signed-off-by: Vladimir Davydov <vdavy...@parallels.com> --- drivers/base/devtmpfs.c | 4 ++-- fs/binfmt_misc.c | 2 +- fs/nfsd/nfsctl.c | 2 +- fs/super.c | 4 ++-- include/linux/fs.h | 2 +- ipc/mqueue.c | 2 +- net/sunrpc/rpc_pipe.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index 349d6eb..6f4ba37 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -59,9 +59,9 @@ static struct dentry *dev_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { #ifdef CONFIG_TMPFS - return mount_ns(fs_type, flags, data, get_exec_env(), shmem_fill_super); + return mount_ns(fs_type, flags, data, shmem_fill_super); #else - return mount_ns(fs_type, flags, data, get_exec_env(), ramfs_fill_super); + return mount_ns(fs_type, flags, data, ramfs_fill_super); #endif } diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 460d53f..7e760d2 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -734,7 +734,7 @@ static int bm_fill_super(struct super_block * sb, void * data, int silent) static struct dentry *bm_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - return mount_ns(fs_type, flags, data, get_exec_env(), bm_fill_super); + return mount_ns(fs_type, flags, get_exec_env(), bm_fill_super); } static struct linux_binfmt misc_format = { diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 9b690c9..7411a56 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -1126,7 +1126,7 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) static struct dentry *nfsd_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - return mount_ns(fs_type, flags, NULL, current->nsproxy->net_ns, nfsd_fill_super); + return mount_ns(fs_type, flags, current->nsproxy->net_ns, nfsd_fill_super); } static void nfsd_umount(struct super_block *sb) diff --git a/fs/super.c b/fs/super.c index 7f316e8..c9b47bf 100644 --- a/fs/super.c +++ b/fs/super.c @@ -890,11 +890,11 @@ static int ns_set_super(struct super_block *sb, void *data) } struct dentry *mount_ns(struct file_system_type *fs_type, int flags, - void *data, void *ns, int (*fill_super)(struct super_block *, void *, int)) + void *data, int (*fill_super)(struct super_block *, void *, int)) { struct super_block *sb; - sb = sget(fs_type, ns_test_super, ns_set_super, flags, ns); + sb = sget(fs_type, ns_test_super, ns_set_super, flags, data); if (IS_ERR(sb)) return ERR_CAST(sb); diff --git a/include/linux/fs.h b/include/linux/fs.h index 3a2b604..68cec28 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2093,7 +2093,7 @@ struct file_system_type { #define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-" NAME) extern struct dentry *mount_ns(struct file_system_type *fs_type, int flags, - void *data, void *ns, int (*fill_super)(struct super_block *, void *, int)); + void *data, int (*fill_super)(struct super_block *, void *, int)); extern struct dentry *mount_bdev(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, int (*fill_super)(struct super_block *, void *, int)); diff --git a/ipc/mqueue.c b/ipc/mqueue.c index c5f1d3e..18620cd 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -341,7 +341,7 @@ static struct dentry *mqueue_mount(struct file_system_type *fs_type, data = ns; } - return mount_ns(fs_type, flags, NULL, data, mqueue_fill_super); + return mount_ns(fs_type, flags, data, mqueue_fill_super); } static void init_once(void *foo) diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 7d4e81a..875f9c7 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -1457,7 +1457,7 @@ static struct dentry * rpc_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - return mount_ns(fs_type, flags, NULL, current->nsproxy->net_ns, rpc_fill_super); + return mount_ns(fs_type, flags, current->nsproxy->net_ns, rpc_fill_super); } static void rpc_kill_sb(struct super_block *sb) _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel