From 773e660de0c45221b53cf2a489f28209145475db Mon Sep 17 00:00:00 2001 From: vmallika Date: Tue, 29 Mar 2016 18:34:11 +0530 Subject: server: send lookup on root inode when itable is created * xlators like quota, marker, posix_acl can cause problems if inode-ctx are not created. sometime these xlarors may not get lookup on root inode with below cases 1) client may not send lookup on root inode (like NSR leader) 2) if the xlators on one of the bricks are not up, and client sending lookup during this time: brick can miss the lookup It is always better to make sure that there is one lookup on root. So send a first lookup when the inode table is created * When sending lookup on root, new inode is created, we need to use itable->root instead Change-Id: Iff2eeaa1a89795328833a7761789ef588f11218f BUG: 1320818 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/13837 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Jeff Darcy --- xlators/protocol/server/src/server.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/protocol/server/src/server.c') diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 24e31500453..cb2a0f6c1d9 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -939,6 +939,8 @@ init (xlator_t *this) INIT_LIST_HEAD (&conf->xprt_list); pthread_mutex_init (&conf->mutex, NULL); + LOCK_INIT (&conf->itable_lock); + /* Set event threads to the configured default */ GF_OPTION_INIT("event-threads", conf->event_threads, int32, out); ret = server_check_event_threads (this, conf, STARTING_EVENT_THREADS, -- cgit