From 6ea3dcbd65d188c3a184653863664b7b11211f68 Mon Sep 17 00:00:00 2001 From: Slawomir Jankowski Date: Mon, 22 Mar 2021 17:46:04 +0100 Subject: [PATCH] Allow to add special deviced as cores to the cache Add below devices to whitelist: * CAS device partitions - fix, * RAM devices - new, * null block devices - new. Signed-off-by: Slawomir Jankowski Signed-off-by: Robert Baldyga --- casadm/cas_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/casadm/cas_lib.c b/casadm/cas_lib.c index a6b0c8e..a4d18dd 100644 --- a/casadm/cas_lib.c +++ b/casadm/cas_lib.c @@ -626,7 +626,13 @@ static bool is_dev_link_whitelisted(const char* path) { regex_t regex; int result; - static const char* const whitelist[] = {"/dev/cas[0-9]\\+-[0-9]\\+$"}; + static const char* const whitelist[] = { + "/dev/cas[0-9]\\+-[0-9]\\+$", + "/dev/cas[0-9]\\+-[0-9]\\+p[0-9]\\+$", + "/dev/ram[0-9]\\+$", + "/dev/ram[0-9]\\+p[0-9]\\+$", + "/dev/nullb[0-9]\\+$" + }; static const unsigned count = ARRAY_SIZE(whitelist); size_t i;