From 9525781e747c7e799ef0c92920a12259e9940f6a Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 13 Apr 2010 12:47:09 +0000 Subject: cluster/afr: Send xattr in lookup from the source subvolume. Signed-off-by: Vikas Gorur Signed-off-by: Anand V. Avati BUG: 815 (quick-read and replicate self-heal interaction result in empty reads) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=815 --- xlators/cluster/afr/src/afr-self-heal-data.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 75090ad79ae..265628d2e08 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -741,6 +741,14 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this) afr_set_read_child (this, local->loc.inode, sh->source); + /* + quick-read might have read the file, so send xattr from + the source subvolume (http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=815) + */ + + dict_unref (orig_local->cont.lookup.xattr); + orig_local->cont.lookup.xattr = dict_ref (orig_local->cont.lookup.xattrs[sh->source]); + if (sh->background) { sh->unwind (sh->orig_frame, this); sh->unwound = _gf_true; -- cgit