summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2015-02-03 21:34:45 +0530
committerVijay Bellur <vbellur@redhat.com>2015-02-04 13:42:43 -0800
commit0b198a113e254f6a2702a87a45e823cea964ab11 (patch)
tree59d78d8a318467c11ef73d474f8bfaf13f50efd3 /xlators
parent552958c95ff4c4fea7c370a87e937e4a88973da1 (diff)
cluster/afr: Fix parent read subvol selection policy in lookup
When lookup has succeeded on multiple subvols of AFR (including the read child of the parent dir) and all of them are "readable", ideally the call must be unwound with postparent from the parent's read child. But that is not the case, due to a bug introduced in the commit c78998c39f0857ea7aacba360632c148afc54a55. This patch fixes the issue. Change-Id: I83b0c26494a5d0bdbc30fcbe974fbdb6f7e9c84a BUG: 1179169 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9569 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-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 04e4ca315f2..0e321e620f7 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1245,7 +1245,7 @@ afr_get_parent_read_subvol (xlator_t *this, inode_t *parent,
continue;
}
- if ((i != par_read_subvol) && readable[i])
+ if ((par_read_subvol_iter != par_read_subvol) && readable[i])
par_read_subvol_iter = i;
if (i == par_read_subvol)