summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.c
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2015-03-17 13:16:45 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-03-25 01:58:53 -0700
commit6477c13c63e181dec4f034d8d25435026550d93a (patch)
tree606d8e9acbe88a90fd0b33ea6f09eb033c0c8aa1 /xlators/cluster/afr/src/afr.c
parente4d8dc2e80f0683c69481c47875c01c8c3723814 (diff)
cluster/afr: Make read child match check in afr optional
Backport of: http://review.gluster.org/9917 Having this particular check which was introduced by commit c57c455347a72ebf0085add49ff59aae26c7a70d causes a drop in performance in readdirp. So the behavior is made configurable with this patch. Change-Id: I4a19813cfc786504340264a5a5533a0c43a1d4a4 BUG: 1202673 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9929 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r--xlators/cluster/afr/src/afr.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 2c0ff05fd78..1382f266872 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -200,6 +200,9 @@ reconfigure (xlator_t *this, dict_t *options)
GF_OPTION_RECONF ("iam-self-heal-daemon", priv->shd.iamshd, options,
bool, out);
+ GF_OPTION_RECONF ("consistent-metadata", priv->consistent_metadata,
+ options, bool, out);
+
priv->did_discovery = _gf_false;
ret = 0;
@@ -347,6 +350,9 @@ init (xlator_t *this)
GF_OPTION_INIT ("iam-self-heal-daemon", priv->shd.iamshd, bool, out);
+ GF_OPTION_INIT ("consistent-metadata", priv->consistent_metadata, bool,
+ out);
+
priv->wait_count = 1;
priv->child_up = GF_CALLOC (sizeof (unsigned char), child_count,
@@ -749,5 +755,15 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_BOOL,
.default_value = "off",
},
+ { .key = {"consistent-metadata"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "no",
+ .description = "If this option is enabled, readdirp will force "
+ "lookups on those entries read whose read child is "
+ "not the same as that of the parent. This will "
+ "guarantee that all read operations on a file serve "
+ "attributes from the same subvol as long as it holds "
+ " a good copy of the file/dir.",
+ },
{ .key = {NULL} },
};