From cc57da87504621655d4acb7ec65e27f45b2b72d1 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 1 Dec 2009 06:11:05 +0000 Subject: 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 Signed-off-by: Anand V. Avati BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320 --- xlators/cluster/afr/src/afr-self-heal-data.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/cluster') 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++) { -- cgit