summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec.c
diff options
context:
space:
mode:
authorSunil Kumar Acharya <sheggodu@redhat.com>2017-04-20 12:24:51 +0530
committerXavier Hernandez <xhernandez@datalab.es>2017-04-25 06:36:27 +0000
commitbf20b066c233a9fc7c82335a131a7969f356b89b (patch)
treefd587efb02d4213c56fa0678c15442334b16d651 /xlators/cluster/ec/src/ec.c
parentf071d2a285ea4802fe8f328f9f275180983fbbba (diff)
cluster/ec: Implement self-heal-window_size option
Fix implements the heal window size option for EC. This option control the maximum size of read/write operation carried out in self-heal process. BUG: 1441491 Change-Id: I6c0ef65c9ca18b0828f91b319d4f52ac5b77d0d8 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com> Reviewed-on: https://review.gluster.org/17098 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/ec/src/ec.c')
-rw-r--r--xlators/cluster/ec/src/ec.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index d61ff1bf36a..e628183190e 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -280,6 +280,8 @@ reconfigure (xlator_t *this, dict_t *options)
uint32, failed);
GF_OPTION_RECONF ("heal-wait-qlength", heal_wait_qlen, options,
uint32, failed);
+ GF_OPTION_RECONF ("self-heal-window-size", ec->self_heal_window_size,
+ options, uint32, failed);
GF_OPTION_RECONF ("heal-timeout", ec->shd.timeout, options,
int32, failed);
ec_configure_background_heal_opts (ec, background_heals,
@@ -663,6 +665,8 @@ init (xlator_t *this)
GF_OPTION_INIT ("eager-lock", ec->eager_lock, bool, failed);
GF_OPTION_INIT ("background-heals", ec->background_heals, uint32, failed);
GF_OPTION_INIT ("heal-wait-qlength", ec->heal_wait_qlen, uint32, failed);
+ GF_OPTION_INIT ("self-heal-window-size", ec->self_heal_window_size, uint32,
+ failed);
ec_configure_background_heal_opts (ec, ec->background_heals,
ec->heal_wait_qlen);
GF_OPTION_INIT ("read-policy", read_policy, str, failed);
@@ -1303,6 +1307,8 @@ int32_t ec_dump_private(xlator_t *this)
ec_bin(tmp, sizeof(tmp), ec->xl_up, ec->nodes));
gf_proc_dump_write("background-heals", "%d", ec->background_heals);
gf_proc_dump_write("heal-wait-qlength", "%d", ec->heal_wait_qlen);
+ gf_proc_dump_write("self-heal-window-size", "%"PRIu32,
+ ec->self_heal_window_size);
gf_proc_dump_write("healers", "%d", ec->healers);
gf_proc_dump_write("heal-waiters", "%d", ec->heal_waiters);
gf_proc_dump_write("read-policy", "%s", ec_read_policies[ec->read_policy]);
@@ -1466,6 +1472,14 @@ struct volume_options options[] =
.description = "force the cpu extensions to be used to accelerate the "
"galois field computations."
},
+ { .key = {"self-heal-window-size"},
+ .type = GF_OPTION_TYPE_INT,
+ .min = 1,
+ .max = 1024,
+ .default_value = "1",
+ .description = "Maximum number blocks(128KB) per file for which "
+ "self-heal process would be applied simultaneously."
+ },
{ .key = {"optimistic-change-log"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "on",