Merge pull request #231 from mmichal10/ioclt-interrupt

Ioctl interrupt
This commit is contained in:
Robert Baldyga 2020-01-04 10:50:03 +01:00 committed by GitHub
commit d53c7bac78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 484 additions and 300 deletions

View File

@ -257,6 +257,10 @@ struct {
KCAS_ERR_CLS_RULE_INVALID_SYNTAX,
"Invalid classification rule syntax"
},
{
KCAS_ERR_WAITING_INTERRUPTED,
"Waiting for operation interrupted"
},
};

File diff suppressed because it is too large Load Diff

View File

@ -111,13 +111,13 @@ static int __init cas_init_module(void)
result = cas_casdisk_lookup_funtions();
if (result) {
printk(KERN_ERR OCF_PREFIX_SHORT
"Could not find inteldisk functions.\n");
"Could not find cas_disk functions.\n");
return result;
}
if (casdisk_functions.casdsk_get_version() != CASDSK_IFACE_VERSION) {
printk(KERN_ERR OCF_PREFIX_SHORT
"Incompatible inteldisk module\n");
"Incompatible cas_disk module\n");
return -EINVAL;
}

View File

@ -50,9 +50,10 @@ static int _cas_io_queue_thread(void *data)
WARN(ocf_queue_pending_io(q), "Still pending IO requests\n");
/* If we get here, then thread was signalled to terminate.
* So, let's complete and exit.
* So, let's free memory and exit.
*/
complete_and_exit(&info->compl, 0);
printk(KERN_DEBUG "Thread %s stopped\n", info->name);
kfree(info);
return 0;
}
@ -201,13 +202,9 @@ static void _cas_start_thread(struct cas_thread_info *info)
static void _cas_stop_thread(struct cas_thread_info *info)
{
if (info->running && info->thread) {
init_completion(&info->compl);
atomic_set(&info->stop, 1);
wake_up(&info->wq);
wait_for_completion(&info->compl);
printk(KERN_DEBUG "Thread %s stopped\n", info->name);
}
kfree(info);
}
int cas_create_queue_thread(ocf_queue_t q, int cpu)

View File

@ -578,6 +578,9 @@ enum kcas_error {
/** Condition token does not identify any known condition */
KCAS_ERR_CLS_RULE_UNKNOWN_CONDITION,
/** Waiting for async operation was interrupted*/
KCAS_ERR_WAITING_INTERRUPTED,
};
#endif

2
ocf

@ -1 +1 @@
Subproject commit 3aa68bcb15e513bb0a53934445fa9e4c75a77ba1
Subproject commit 1ec0a5c053c2e5fb1d502b0aa052030838011278