From 0b198a113e254f6a2702a87a45e823cea964ab11 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Tue, 3 Feb 2015 21:34:45 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/9569 Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/afr') 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) -- cgit