[Devel] [PATCH rh7] fs: inotify: do not impose limit on the number of instances by default
Vladimir Davydov
vdavydov at parallels.com
Tue Aug 25 09:32:46 PDT 2015
In Vz7 we haven't switched to user ns yet. As a result, all containers
use the same user_struct for the same user id. This leads to hitting
fs.inotify.max_user_instances sysctl limit quickly (it equals 128 by
default) and failing to start a container. This patch sets the default
limit to INT_MAX. This is a temporary solution and should be reverted
once we start using user ns.
In PCS6 there is no such problem, because we actually create a user ns
per container there. Although its functionality is basic in comparison
to Vz7, it still results in creating a new user_struct for each user
inside a container so that the inotify limit is containerized.
https://jira.sw.ru/browse/PSBM-39048
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
fs/notify/inotify/inotify_user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 959815c1e017..95d5ebf7fbf6 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -844,8 +844,8 @@ static int __init inotify_user_setup(void)
event_priv_cachep = KMEM_CACHE(inotify_event_private_data, SLAB_PANIC);
inotify_max_queued_events = 16384;
- inotify_max_user_instances = 128;
- inotify_max_user_watches = 8192;
+ inotify_max_user_instances = INT_MAX;
+ inotify_max_user_watches = INT_MAX;
return 0;
}
--
2.1.4
More information about the Devel
mailing list