Purge core command
Purge invalidates all cache lines which belongs to given core. It is very usefull feature for tests. Calling purge is possbile with casadm `--script` swtich. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
@@ -194,6 +194,23 @@ long cas_service_ioctl_ctrl(struct file *filp, unsigned int cmd,
|
||||
RETURN_CMD_RESULT(cmd_info, arg, retval);
|
||||
}
|
||||
|
||||
case KCAS_IOCTL_PURGE_CORE: {
|
||||
struct kcas_flush_core *cmd_info;
|
||||
char cache_name[OCF_CACHE_NAME_SIZE];
|
||||
char core_name[OCF_CORE_NAME_SIZE];
|
||||
|
||||
GET_CMD_INFO(cmd_info, arg);
|
||||
|
||||
cache_name_from_id(cache_name, cmd_info->cache_id);
|
||||
|
||||
core_name_from_id(core_name, cmd_info->core_id);
|
||||
|
||||
retval = cache_mngt_purge_object(cache_name, OCF_CACHE_NAME_SIZE,
|
||||
core_name, OCF_CORE_NAME_SIZE);
|
||||
|
||||
RETURN_CMD_RESULT(cmd_info, arg, retval);
|
||||
}
|
||||
|
||||
case KCAS_IOCTL_FLUSH_CORE: {
|
||||
struct kcas_flush_core *cmd_info;
|
||||
char cache_name[OCF_CACHE_NAME_SIZE];
|
||||
|
Reference in New Issue
Block a user