summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-data.c
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-12-01 06:11:05 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-01 06:30:04 -0800
commitcc57da87504621655d4acb7ec65e27f45b2b72d1 (patch)
tree8e7350d6601766036769283adb456345e4116e68 /xlators/cluster/afr/src/afr-self-heal-data.c
parentab99355f55ce8a55d5c9b339ced830723be5f213 (diff)
cluster/afr: Set file size properly before unwinding from self-heal.
Set the buf.st_size of the original frame's afr_local_t, and not the copy_frame'd one. Signed-off-by: Vikas Gorur <vikas@gluster.com> 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/afr/src/afr-self-heal-data.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index eb0ee9b20b0..dfe586588a5 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -642,7 +642,9 @@ afr_sh_data_sync_prepare (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_fix (call_frame_t *frame, xlator_t *this)
{
- afr_local_t *local = NULL;
+ afr_local_t *local = NULL;
+ afr_local_t * orig_local = NULL;
+
afr_self_heal_t *sh = NULL;
afr_private_t *priv = NULL;
int nsources = 0;
@@ -717,7 +719,8 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this)
if (FILE_HAS_HOLES (&sh->buf[source]))
sh->file_has_holes = 1;
- local->cont.lookup.buf.st_size = sh->buf[source].st_size;
+ orig_local = sh->orig_frame->local;
+ orig_local->cont.lookup.buf.st_size = sh->buf[source].st_size;
/* detect changes not visible through pending flags -- JIC */
for (i = 0; i < priv->child_count; i++) {