summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2011-01-26 13:28:04 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-22 02:11:20 -0800
commit46f0277dfcca246b12700b2c6893abcc14480623 (patch)
tree3bc8d9f1205d480b080528359e0177844f802b4f /xlators/cluster
parentd3c622abaa6788e3b62628d2847618713b896cdf (diff)
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 <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> 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
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-common.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 81f01c125..4b59d26db 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);
- }
}
}