diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2015-04-16 09:24:52 +0200 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-05-19 06:15:19 -0700 |
commit | 690c87816d412cc2a6c6f735c1941810bcb700ea (patch) | |
tree | d6a5f40a3a9c413c996044caeb58e4c314d248d7 /xlators | |
parent | 94fdc9ac821238fc5452613436a10e4928decc77 (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.
Resubmitted as is after rebase.
This is a backport of Id9ccdd8604f79a69db5f1902697f8913acac50ad
BUG: 1138897
Change-Id: I73f5e04dec86e648a28363f417559b0cbf80324d
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/10178
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 2 |
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 ce287aa28e9..16b55347247 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -390,7 +390,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, |