[Devel] [PATCH rh7 0/3] ve/fs/mount: make work with ve->mnt_nr race free

Kirill Tkhai ktkhai at virtuozzo.com
Fri Aug 11 13:11:56 MSK 2017


On 11.08.2017 11:51, Konstantin Khorenko wrote:
> ve->mnt_nr can get unbalanced due to inc and dec in different VE context and
> even wrong because it's not atomic and not protected by any lock.
> 
> This patchset:
> * makes ve->mnt_nr atomic
> * defines min/max limits for "fs.ve-mount-nr" sysctl
> * add VE reference to struct mount to always use proper VE context on mnt free
> 
> https://jira.sw.ru/browse/PSBM-69880
> 
> Test is written:
> https://jira.sw.ru/browse/PSBM-21089
> 
> Konstantin Khorenko (3):
>   ve/fs: convert per-VE number of currently mounted fs to atomic_t
>   ve/fs: limit "fs.ve-mount-nr" sysctl with INT_MAX
>   ve/fs/mount: pin mnt to a VE for correct number of mounts accounting

Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
 
>  fs/mount.h          |  3 +++
>  fs/namespace.c      | 41 ++++++++++++++++++++++++++++++++++++++---
>  include/linux/ve.h  | 26 +-------------------------
>  kernel/ve/ve.c      |  4 ++--
>  kernel/ve/veowner.c |  6 +++++-
>  5 files changed, 49 insertions(+), 31 deletions(-)
> 


More information about the Devel mailing list