From 75038692cd77673f83ec1789e324c5e3e921e118 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Wed, 27 Nov 2024 13:41:00 +0100 Subject: [PATCH] Revert "Disable cache attach and detach" This reverts commit f34328adf2a16a6aa7c6a1b95ec84e6e944525f2. Signed-off-by: Robert Baldyga --- casadm/cas_main.c | 4 ++-- modules/cas_cache/service_ui_ioctl.c | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/casadm/cas_main.c b/casadm/cas_main.c index 1e361bd..f41fb5a 100644 --- a/casadm/cas_main.c +++ b/casadm/cas_main.c @@ -2237,7 +2237,7 @@ static cli_command cas_commands[] = { .options = attach_cache_options, .command_handle_opts = start_cache_command_handle_option, .handle = handle_cache_attach, - .flags = (CLI_SU_REQUIRED | CLI_COMMAND_BLOCKED), + .flags = CLI_SU_REQUIRED, .help = NULL, }, { @@ -2247,7 +2247,7 @@ static cli_command cas_commands[] = { .options = detach_options, .command_handle_opts = command_handle_option, .handle = handle_cache_detach, - .flags = (CLI_SU_REQUIRED | CLI_COMMAND_BLOCKED), + .flags = CLI_SU_REQUIRED, .help = NULL, }, { diff --git a/modules/cas_cache/service_ui_ioctl.c b/modules/cas_cache/service_ui_ioctl.c index 567decc..6f22d5f 100644 --- a/modules/cas_cache/service_ui_ioctl.c +++ b/modules/cas_cache/service_ui_ioctl.c @@ -86,10 +86,6 @@ long cas_service_ioctl_ctrl(struct file *filp, unsigned int cmd, GET_CMD_INFO(cmd_info, arg); - printk(KERN_ERR "Cache attach is not supported!\n"); - retval = -ENOTSUP; - RETURN_CMD_RESULT(cmd_info, arg, retval); - cache_name_from_id(cache_name, cmd_info->cache_id); retval = cache_mngt_attach_cache_cfg(cache_name, OCF_CACHE_NAME_SIZE, @@ -108,9 +104,6 @@ long cas_service_ioctl_ctrl(struct file *filp, unsigned int cmd, char cache_name[OCF_CACHE_NAME_SIZE]; GET_CMD_INFO(cmd_info, arg); - printk(KERN_ERR "Cache detach is not supported!\n"); - retval = -ENOTSUP; - RETURN_CMD_RESULT(cmd_info, arg, retval); cache_name_from_id(cache_name, cmd_info->cache_id);