From bf20b066c233a9fc7c82335a131a7969f356b89b Mon Sep 17 00:00:00 2001 From: Sunil Kumar Acharya Date: Thu, 20 Apr 2017 12:24:51 +0530 Subject: 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 Reviewed-on: https://review.gluster.org/17098 Reviewed-by: Pranith Kumar Karampuri Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/cluster/ec/src/ec-heal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xlators/cluster/ec/src/ec-heal.c') diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c index e4f9c0e3539..afe7833f385 100644 --- a/xlators/cluster/ec/src/ec-heal.c +++ b/xlators/cluster/ec/src/ec-heal.c @@ -1897,7 +1897,6 @@ ec_rebuild_data (call_frame_t *frame, ec_t *ec, fd_t *fd, uint64_t size, ec_heal_t *heal = NULL; int ret = 0; syncbarrier_t barrier; - struct iobuf_pool *pool = NULL; if (syncbarrier_init (&barrier)) return -ENOMEM; @@ -1907,9 +1906,8 @@ ec_rebuild_data (call_frame_t *frame, ec_t *ec, fd_t *fd, uint64_t size, heal->xl = ec->xl; heal->data = &barrier; syncbarrier_init (heal->data); - pool = ec->xl->ctx->iobuf_pool; heal->total_size = size; - heal->size = iobpool_default_pagesize (pool); + heal->size = (128 * GF_UNIT_KB * (ec->self_heal_window_size)); /* We need to adjust the size to a multiple of the stripe size of the * volume. Otherwise writes would need to fill gaps (head and/or tail) * with existent data from the bad bricks. This could be garbage on a -- cgit