[Devel] [PATCH vz8 2/2] ve: drop /proc/bc directory #PSBM-127913

Kirill Tkhai ktkhai at virtuozzo.com
Tue Apr 6 10:55:02 MSK 2021


On 05.04.2021 20:37, Denis V. Lunev wrote:
> It is obsolete and unused.
> 
> Signed-off-by: Denis V. Lunev <den at openvz.org>
> ---
>  kernel/ve/veowner.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/kernel/ve/veowner.c b/kernel/ve/veowner.c
> index d7b3b94bd3e6..90af7bc720ff 100644
> --- a/kernel/ve/veowner.c
> +++ b/kernel/ve/veowner.c
> @@ -18,18 +18,12 @@
>  #ifdef CONFIG_PROC_FS
>  struct proc_dir_entry *proc_vz_dir;
>  EXPORT_SYMBOL(proc_vz_dir);
> -struct proc_dir_entry *bc_proc_root;
> -EXPORT_SYMBOL(bc_proc_root);
>  
>  static void prepare_proc(void)
>  {
>  	proc_vz_dir = proc_mkdir_mode("vz", S_ISVTX | S_IRUGO | S_IXUGO, NULL);
>  	if (!proc_vz_dir)
>  		panic("Can't create /proc/vz dir");
> -
> -	bc_proc_root = proc_mkdir_mode("bc", 0, NULL);
> -        if (!bc_proc_root)
> -                panic("Can't create /proc/bc entry");

This directory is used by systemd to detect container.
>From systemd:src/basic/virt.c:

        /* /proc/vz exists in container and outside of the container,
         * /proc/bc only outside of the container. */
        if (access("/proc/vz", F_OK) >= 0 &&
            access("/proc/bc", F_OK) < 0) {
                r = VIRTUALIZATION_OPENVZ;
                goto finish;
        }


>  }
>  #endif
>  
> 



More information about the Devel mailing list