From 24bf7715140586675f8d2036f4d589bc255c16dc Mon Sep 17 00:00:00 2001 From: Poornima G Date: Tue, 9 Jan 2018 17:26:44 +0530 Subject: md-cache: Implement dynamic configuration of xattr list for caching Currently, the list of xattrs that md-cache can cache is hard coded in the md-cache.c file, this necessiates code change and rebuild everytime a new xattr needs to be added to md-cache xattr cache list. With this patch, the user will be able to configure a comma seperated list of xattrs to be cached by md-cache Updates #297 Change-Id: Ie35ed607d17182d53f6bb6e6c6563ac52bc3132e Signed-off-by: Poornima G --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 174395598d8..acb493540da 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1898,7 +1898,14 @@ struct volopt_map_entry glusterd_volopt_map[] = { .op_version = GD_OP_VERSION_4_0_0, .flags = VOLOPT_FLAG_CLIENT_OPT }, - + { .key = "performance.xattr-cache-list", + .voltype = "performance/md-cache", + .option = "xattr-cache-list", + .op_version = GD_OP_VERSION_4_0_0, + .flags = VOLOPT_FLAG_CLIENT_OPT, + .description = "A comma separeted list of xattrs that shall be " + "cached by md-cache. The only wildcard allowed is '*'" + }, /* Crypt xlator options */ { .key = "features.encryption", -- cgit