summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-10-24 08:17:36 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-26 07:09:09 -0700
commit7445700d0323cbfac11b0e1367b0052438e38318 (patch)
tree01fc1b50eee46a10658cf36b1ead1b7b113cba39 /xlators/cluster
parent4163a3f8fbcc5e0d84d955258161f3a6f7a86de8 (diff)
cluster/afr: Set read-subvolume to the source while self-heal is in progress.
Just before the lookup is unwound during background data self-heal, the read subvolume is set to the self-heal source subvol so that read operations on the file work correctly, and don't have to wait for the self-heal to complete. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 718c716f55a..2118fd66df5 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -769,6 +769,7 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this)
}
if (sh->background) {
+ afr_set_read_child (this, local->loc.inode, sh->source);
sh->unwind (frame, this);
}