From da0972232e97e761a839d9db9bbe7a04c6ff13e9 Mon Sep 17 00:00:00 2001 From: Raghavendra Date: Tue, 23 Oct 2012 11:32:33 +0530 Subject: cluster/distribute: send getxattr on LOCKINFO to only cached subvolumes. lk is sent to only cached subvolume. Hence there is no point in sending LOCKINFO to other children (even in case of directories). Change-Id: Ia20fc358dfa84cee9a52d1f613564ff6f25aa0c9 BUG: 808400 Signed-off-by: Raghavendra Reviewed-on: http://review.gluster.org/4123 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index f1f98189..98560685 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2095,7 +2095,9 @@ dht_fgetxattr (call_frame_t *frame, xlator_t *this, } } - if (fd->inode->ia_type == IA_IFDIR) { + if ((fd->inode->ia_type == IA_IFDIR) + && (strncmp (key, GF_XATTR_LOCKINFO_KEY, + strlen (GF_XATTR_LOCKINFO_KEY) != 0))) { cnt = local->call_cnt = layout->cnt; } else { cnt = local->call_cnt = 1; -- cgit