From 46f0277dfcca246b12700b2c6893abcc14480623 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Wed, 26 Jan 2011 13:28:04 +0000 Subject: replicate: set read-child to the subvolume which replied first (fastest) In the old logic read-child was set to the last subvolume which replied. Now it is updated to the first subvolume. This way we can ensure that local servers are preferred for reads _most_ of the times. Signed-off-by: Anand Avati Signed-off-by: Anand V. Avati BUG: 1172 (ls -lh on NFS mount of 2-mirror replicate gives incorrect file size) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1172 --- xlators/cluster/afr/src/afr-common.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 81f01c12..4b59d26d 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -852,16 +852,6 @@ afr_fresh_lookup_cbk (call_frame_t *frame, void *cookie, local->cont.lookup.postparent = *postparent; *lookup_buf = *buf; - - if (priv->read_child >= 0) { - afr_set_read_child (this, - local->cont.lookup.inode, - priv->read_child); - } else { - afr_set_read_child (this, - local->cont.lookup.inode, - local->read_child_index); - } } } @@ -980,16 +970,6 @@ afr_revalidate_lookup_cbk (call_frame_t *frame, void *cookie, local->cont.lookup.postparent = *postparent; *lookup_buf = *buf; - - if (priv->read_child >= 0) { - afr_set_read_child (this, - local->cont.lookup.inode, - priv->read_child); - } else { - afr_set_read_child (this, - local->cont.lookup.inode, - local->read_child_index); - } } } -- cgit