summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2015-03-09 09:06:20 +0100
committerVijay Bellur <vbellur@redhat.com>2015-04-02 04:04:38 -0700
commitdb7b8d6e5d4485fc5a6e836447dfa5d3cb85b5fd (patch)
treeaca0d0f0c869874ad770ee99f38ca9a5c2f845f5 /xlators/cluster/afr
parent4e721bde62bfa4080afe9714743410281260a277 (diff)
Tests: fix spurious failure in read-subvol-entry.t
read-subvol-entry.t tests that if a brick has pending operations, it is not used for readdir operations. On NetBSD this test exhibits spurious failures, with the wrong brick being used to perform readdir. It happens because when afr_replies_interpret() looks at xattr for pending attributes, it uses alternative bahvior whether it is working on a directory or another object. The decision is based on inode->ia_type, which may be IA_INVAL at that time if we come there from: afr_replies_interpret.() afr_xattrs_are_equal() afr_lookup_metadata_heal_chec() afr_lookup_entry_heal() afr_lookup_cbk() Using replies[i].poststat.ia_type, which is correctly set, works around the problem. BUG: 1129939 Change-Id: Id9ccdd8604f79a69db5f1902697f8913acac50ad Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9831 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r--xlators/cluster/afr/src/afr-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 6c06fd9b7b5..58c33e20d36 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -502,7 +502,7 @@ afr_replies_interpret (call_frame_t *frame, xlator_t *this, inode_t *inode)
}
afr_accused_fill (this, replies[i].xdata, data_accused,
- (inode->ia_type == IA_IFDIR) ?
+ (replies[i].poststat.ia_type == IA_IFDIR) ?
AFR_ENTRY_TRANSACTION : AFR_DATA_TRANSACTION);
afr_accused_fill (this, replies[i].xdata,