[Devel] [PATCH RHEL7 COMMIT] ve/fs/inotify: do not impose limit on the number of instances by default

Konstantin Khorenko khorenko at virtuozzo.com
Tue Sep 1 06:40:59 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.6.5
------>
commit db1716aedfb68f9e479c352b1758447fdd0799c5
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Tue Sep 1 17:40:59 2015 +0400

    ve/fs/inotify: do not impose limit on the number of instances by default
    
    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>
    
    khorenko@: to be reverted once we support userns in Virtuozzo 7
---
 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 959815c..95d5ebf 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;
 }



More information about the Devel mailing list