[Devel] [PATCH VZ10 v2 3/6] ve/fs: Rework per-ve mount count
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Wed Jul 22 15:27:11 MSK 2026
On 7/16/26 22:50, Vladimir Riabchun wrote:
> Previous approach with current mounts counter had an issue:
> there was a gap between ve_mount_allowed check and ve_mount_nr_inc,
> which could allow CT to have more mounts than expected.
>
> Fix this by tracking the number of available mounts instead
> of current ones. This also makes resources accounting
> more consistent - we are using ***_avail_nr approach more.
>
> One more issue with inconsistent ve value is fixed:
> ve_mount_allowed always used ve from get_exec_env, but
> ve_mount_nr_inc operated with owner_ve.
> Now actual ve value is calculated in the beginning of alloc_vfsmnt.
>
> ve_ns_owner_test is updated as well.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-135520
>
> Feature: per-ve failcounters
> Signed-off-by: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
> ---
> fs/namespace.c | 58 ++++++++++---------
> include/linux/ve.h | 2 +-
> kernel/ve/ve.c | 12 ++--
> tools/testing/selftests/ve/ve_ns_owner_test.c | 29 +++++-----
I personally prefer to split test hunks into separate test related commit.
> 4 files changed, 52 insertions(+), 49 deletions(-)
--
Best regards, Pavel Tikhomirov
Senior Software Developer, Virtuozzo.
More information about the Devel
mailing list