[Devel] [PATCH rh7 0/3] ve/fs/mount: make work with ve->mnt_nr race free
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Aug 11 11:51:02 MSK 2017
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
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(-)
--
1.8.3.1
More information about the Devel
mailing list