From e43b40296956d132c70ffa3aa07b0078733b39d4 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Fri, 19 May 2017 11:09:13 +0530 Subject: rda, glusterd: Change the max of rda-cache-limit to INFINITY Issue: The max value of rda-cache-limit is 1GB before this patch. When parallel-readdir is enabled, there will be many instances of readdir-ahead, hence the rda-cache-limit depends on the number of instances. Eg: On a volume with distribute count 4, rda-cache-limit when parallel-readdir is enabled, will be 4GB instead of 1GB. Consider a followinf sequence of operations: - Enable parallel readdir - Set rda-cache-limit to lets say 3GB - Disable parallel-readdir, this results in one instance of readdir-ahead and the rda-cache-limit will be back to 1GB, but the current value is 3GB and hence the mount will stop working as 3GB > max 1GB. Solution: To fix this, we can limit the cache to 1GB even when parallel-readdir is enabled. But there is no necessity to limit the cache to 1GB, it can be increased if the system has enough resources. Hence getting rid of the rda-cache-limit max value is more apt. If we just change the rda-cache-limit max to INFINITY, we will render older(<3.11) clients broken, when the rda-cache-limit is set to > 1GB (as the older clients still expect a value < 1GB). To safely change the max value of rda-cache-limit to INFINITY, add a check in glusted to verify all the clients are > 3.11 if the value exceeds 1GB. Change-Id: Id0cdda3b053287b659c7bf511b13db2e45b92032 BUG: 1446516 Signed-off-by: Poornima G Reviewed-on: https://review.gluster.org/17338 Smoke: Gluster Build System Reviewed-by: Atin Mukherjee NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/performance/readdir-ahead/src/readdir-ahead.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/performance/readdir-ahead') diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c index 2ffcf25d8a7..4e7f2b9a879 100644 --- a/xlators/performance/readdir-ahead/src/readdir-ahead.c +++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c @@ -23,6 +23,7 @@ * preloads on the directory. */ +#include #include "glusterfs.h" #include "xlator.h" #include "call-stub.h" @@ -739,7 +740,7 @@ struct volume_options options[] = { { .key = {"rda-cache-limit"}, .type = GF_OPTION_TYPE_SIZET, .min = 0, - .max = 1 * GF_UNIT_GB, + .max = INFINITY, .default_value = "10MB", .description = "maximum size of cache consumed by readdir-ahead " "xlator. This value is global and total memory " -- cgit