Introduce io_queues_lock

The queues can be created and destroyed dynamically at any point in
the cache lifetime, and this can happen from different execution contexts,
thus there is a need to protect the queue_list with a lock.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Robert Baldyga
2024-01-30 18:49:36 +01:00
committed by Michal Mielewczyk
parent 8db93260ae
commit b00ab08473
3 changed files with 32 additions and 11 deletions

View File

@@ -107,6 +107,8 @@ struct ocf_cache {
struct ocf_cleaner cleaner;
struct list_head io_queues;
env_spinlock io_queues_lock;
ocf_promotion_policy_t promotion_policy;
struct {