Purge cache command
Purge invalidates all cache lines. 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:
@@ -154,6 +154,19 @@ long cas_service_ioctl_ctrl(struct file *filp, unsigned int cmd,
|
||||
RETURN_CMD_RESULT(cmd_info, arg, retval);
|
||||
}
|
||||
|
||||
case KCAS_IOCTL_PURGE_CACHE: {
|
||||
struct kcas_flush_cache *cmd_info;
|
||||
char cache_name[OCF_CACHE_NAME_SIZE];
|
||||
|
||||
GET_CMD_INFO(cmd_info, arg);
|
||||
|
||||
cache_name_from_id(cache_name, cmd_info->cache_id);
|
||||
|
||||
retval = cache_mngt_purge_device(cache_name, OCF_CACHE_NAME_SIZE);
|
||||
|
||||
RETURN_CMD_RESULT(cmd_info, arg, retval);
|
||||
}
|
||||
|
||||
case KCAS_IOCTL_FLUSH_CACHE: {
|
||||
struct kcas_flush_cache *cmd_info;
|
||||
char cache_name[OCF_CACHE_NAME_SIZE];
|
||||
|
Reference in New Issue
Block a user