parallelize: Create number of shards requested by user
In some scenarios running the exact number of shards, regardless of number of available queues is crucial for correctness of operation. Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
parent
5c714cb3de
commit
55b99518ed
@ -64,10 +64,7 @@ int ocf_parallelize_create(ocf_parallelize_t *parallelize,
|
||||
queue_count = ocf_cache_get_queue_count(cache);
|
||||
|
||||
if (shards_cnt == 0)
|
||||
shards_cnt = queue_count;
|
||||
|
||||
if (queue_count == 0)
|
||||
shards_cnt = 1;
|
||||
shards_cnt = queue_count ?: 1;
|
||||
|
||||
prl_size = sizeof(*tmp_parallelize) +
|
||||
shards_cnt * sizeof(*tmp_parallelize->reqs);
|
||||
|
Loading…
Reference in New Issue
Block a user