summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-dir-read.c
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2015-03-17 13:16:45 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-03-18 02:29:22 -0700
commitc9b1aea9b3f7087336c75548b59574f251813136 (patch)
tree50e765c4a72d58c9ffb22a04830d8fde2e3be811 /xlators/cluster/afr/src/afr-dir-read.c
parent368dfd695928e8fc40988b8f2de86c3b469172d2 (diff)
cluster/afr: Make read child match check in afr optional
Having this particular check which was introduced by commit c78998c39f0857ea7aacba360632c148afc54a55 causes a drop in performance in readdirp. So the behavior is made configurable with this patch. Change-Id: I2858fc18b3539df7aa6d3f489e0d5cfaeb8a9b3c BUG: 1202669 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9917 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-read.c')
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index 28bf89f2842..984ed9c6095 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -149,6 +149,10 @@ afr_validate_read_subvol (inode_t *inode, xlator_t *this, int par_read_subvol)
* either afr_data_subvol_get() or afr_metadata_subvol_get() would
* yield the same result. Hence, choosing afr_data_subvol_get() below.
*/
+
+ if (!priv->consistent_metadata)
+ return 0;
+
entry_read_subvol = afr_data_subvol_get (inode, this, 0, 0);
if (entry_read_subvol != par_read_subvol)
return -1;