diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-03-17 13:16:45 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-03-18 02:29:22 -0700 |
commit | c9b1aea9b3f7087336c75548b59574f251813136 (patch) | |
tree | 50e765c4a72d58c9ffb22a04830d8fde2e3be811 /xlators/cluster/afr/src/afr.c | |
parent | 368dfd695928e8fc40988b8f2de86c3b469172d2 (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.c')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index f435767f5e4..f962fb6494e 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -213,6 +213,8 @@ reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("quorum-reads", priv->quorum_reads, options, bool, out); + GF_OPTION_RECONF ("consistent-metadata", priv->consistent_metadata, + options, bool, out); priv->did_discovery = _gf_false; @@ -363,6 +365,8 @@ init (xlator_t *this) GF_OPTION_INIT ("heal-timeout", priv->shd.timeout, int32, out); GF_OPTION_INIT ("quorum-reads", priv->quorum_reads, bool, out); + GF_OPTION_INIT ("consistent-metadata", priv->consistent_metadata, bool, + out); priv->wait_count = 1; @@ -780,5 +784,15 @@ struct volume_options options[] = { .description = "time interval for checking the need to self-heal " "in self-heal-daemon" }, + { .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} }, }; |