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 <slawomir.jankowski@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Slawomir Jankowski 2021-03-22 17:46:04 +01:00 committed by Robert Baldyga
parent 301854ae39
commit 6ea3dcbd65

View File

@ -626,7 +626,13 @@ static bool is_dev_link_whitelisted(const char* path)
{ {
regex_t regex; regex_t regex;
int result; 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); static const unsigned count = ARRAY_SIZE(whitelist);
size_t i; size_t i;