summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r--xlators/cluster/afr/src/afr.c14
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} },
};