summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-06-28 16:03:52 +0530
committerVijay Bellur <vbellur@redhat.com>2013-07-03 07:33:13 -0700
commitb64a7f8497d9752f4da5a42aeeeebbd7727c442b (patch)
tree0fdd9ab26be7f280b7e05414d8e95cf16c241d10 /xlators/cluster/afr/src/afr.c
parent29619b4ee78926160435da82f9db213161e040d4 (diff)
cluster/afr: Provide an option to disable afr durability
Change-Id: I40eec20ca6b3f857245a2438883822e251077ee9 BUG: 979365 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/5269 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r--xlators/cluster/afr/src/afr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 6fabc00171f..9a13fbdacd9 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -191,6 +191,8 @@ reconfigure (xlator_t *this, dict_t *options)
/* Reset this so we re-discover in case the topology changed. */
GF_OPTION_RECONF ("readdir-failover", priv->readdir_failover, options,
bool, out);
+ GF_OPTION_RECONF ("ensure-durability", priv->ensure_durability, options,
+ bool, out);
priv->did_discovery = _gf_false;
ret = 0;
@@ -335,6 +337,8 @@ init (xlator_t *this)
GF_OPTION_INIT ("post-op-delay-secs", priv->post_op_delay_secs, uint32, out);
GF_OPTION_INIT ("readdir-failover", priv->readdir_failover, bool, out);
+ GF_OPTION_INIT ("ensure-durability", priv->ensure_durability, bool,
+ out);
priv->wait_count = 1;
@@ -767,5 +771,12 @@ struct volume_options options[] = {
.description = "readdir(p) will not failover if this option is off",
.default_value = "on",
},
+ { .key = {"ensure-durability"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .description = "Afr performs fsyncs for transactions if this "
+ "option is on to make sure the changelogs/data is "
+ "written to the disk",
+ .default_value = "on",
+ },
{ .key = {NULL} },
};