cluster/afr: Send xattr in lookup from the source subvolume.

Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

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
This commit is contained in:
Vikas Gorur 2010-04-13 12:47:14 +00:00 committed by Anand V. Avati
parent 51f521ac9a
commit 477f6d1cdc

View File

@ -734,6 +734,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;