[Devel] [PATCH VZ10 1/8] ve/mntns: add ve_owner to struct mnt_namespace

Konstantin Khorenko khorenko at virtuozzo.com
Thu May 14 17:39:51 MSK 2026


On 4/29/26 15:41, Pavel Tikhomirov wrote:
> Introduce a ve_owner field on struct mnt_namespace pointing at the ve
> that owns the namespace.
> 
> This will be used to derive correct ownership of newly created mounts in
> case of simultaneous creation of new ve namespace and mount namespace,
> were we would like new mounts to have the new ve as an owner.

s/were/where

> 
> There is no change in behaviour yet: alloc_mnt_ns() still resolves the
> owner from current ve via get_exec_env().
> 
> To ensure the pointer is valid, alloc_mnt_ns takes and free_mnt_ns()
> drops the reference.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-129744
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> Feature: ve: ve generic structures
> ---
>   fs/mount.h     | 6 ++++++
>   fs/namespace.c | 8 ++++++++
>   2 files changed, 14 insertions(+)
> 
> diff --git a/fs/mount.h b/fs/mount.h
> index 8e8fa47f54fd..dd1ef7e40639 100644
> --- a/fs/mount.h
> +++ b/fs/mount.h
> @@ -4,6 +4,9 @@
>   #include <linux/poll.h>
>   #include <linux/ns_common.h>
>   #include <linux/fs_pin.h>
> +#ifdef CONFIG_VE
> +#include <linux/ve.h>
> +#endif

i will remove ifdef CONFIG_VE here.
We have many places of includes without ifdef, the !CONFIG_VE case should be handled inside ve.h




More information about the Devel mailing list