From 5fa004f3c4924dd6d83aecd5f33fc58badbe9305 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Fri, 20 Jul 2018 10:52:22 +0530 Subject: features/shard: Make lru limit of inode list configurable Currently this lru limit is hard-coded to 16384. This patch makes it configurable to make it easier to hit the lru limit and enable testing of different cases that arise when the limit is reached. The option is features.shard-lru-limit. It is by design allowed to be configured only in init() but not in reconfigure(). This is to avoid all the complexity associated with eviction of least recently used shards when the list is shrunk. Change-Id: Ifdcc2099f634314fafe8444e2d676e192e89e295 updates: bz#1605056 Signed-off-by: Krutika Dhananjay --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index c5a4b267692..4c69a573ab5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -3455,6 +3455,12 @@ struct volopt_map_entry glusterd_volopt_map[] = { .op_version = GD_OP_VERSION_3_7_0, .flags = VOLOPT_FLAG_CLIENT_OPT }, + { .key = "features.shard-lru-limit", + .voltype = "features/shard", + .op_version = GD_OP_VERSION_4_2_0, + .flags = VOLOPT_FLAG_CLIENT_OPT, + .type = NO_DOC, + }, { .key = "features.shard-deletion-rate", .voltype = "features/shard", .op_version = GD_OP_VERSION_4_2_0, -- cgit