Merge pull request #43 from mmichal10/task-code-refactoring
Code refactoring
This commit is contained in:
commit
21eb60ef1e
@ -639,7 +639,7 @@ static inline void __remove_line_from_waiters_list(struct ocf_cache_concurrency
|
||||
struct __waiters_list *lst = &c->waiters_lsts[idx];
|
||||
struct list_head *iter, *next;
|
||||
struct __waiter *waiter;
|
||||
unsigned long flags;
|
||||
unsigned long flags = 0;
|
||||
|
||||
__lock_waiters_list(c, line, flags);
|
||||
|
||||
|
@ -109,7 +109,7 @@ const struct ocf_io_if *ocf_get_io_if(ocf_req_cache_mode_t req_cache_mode)
|
||||
struct ocf_request *ocf_engine_pop_req(struct ocf_cache *cache,
|
||||
struct ocf_queue *q)
|
||||
{
|
||||
unsigned long lock_flags;
|
||||
unsigned long lock_flags = 0;
|
||||
struct ocf_request *req;
|
||||
|
||||
OCF_CHECK_NULL(q);
|
||||
|
@ -489,7 +489,7 @@ void ocf_engine_push_req_back(struct ocf_request *req, bool allow_sync)
|
||||
{
|
||||
struct ocf_cache *cache = req->cache;
|
||||
struct ocf_queue *q = NULL;
|
||||
unsigned long lock_flags;
|
||||
unsigned long lock_flags = 0;
|
||||
|
||||
INIT_LIST_HEAD(&req->list);
|
||||
|
||||
@ -514,7 +514,7 @@ void ocf_engine_push_req_front(struct ocf_request *req, bool allow_sync)
|
||||
{
|
||||
struct ocf_cache *cache = req->cache;
|
||||
struct ocf_queue *q = NULL;
|
||||
unsigned long lock_flags;
|
||||
unsigned long lock_flags = 0;
|
||||
|
||||
INIT_LIST_HEAD(&req->list);
|
||||
|
||||
|
@ -230,7 +230,6 @@ static int ocf_metadata_hash_calculate_metadata_size(
|
||||
|
||||
OCF_DEBUG_PARAM(cache, "Cache lines = %lld", cache_lines);
|
||||
|
||||
cache_lines = ctrl->device_lines;
|
||||
lowest_diff = cache_lines;
|
||||
|
||||
do {
|
||||
@ -755,7 +754,6 @@ static void ocf_metadata_hash_init_freelist_striping(
|
||||
|
||||
/* Modified initialization procedure */
|
||||
prev = next = collision_table_entries;
|
||||
idx = 0;
|
||||
last_page = pages;
|
||||
|
||||
for (i = 0; i < pages; i++) {
|
||||
|
@ -268,6 +268,7 @@ int ocf_mngt_io_class_configure(ocf_cache_t cache,
|
||||
result = _ocf_mngt_io_class_configure(cache, cfg);
|
||||
|
||||
ocf_mngt_cache_unlock(cache);
|
||||
return 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ static int _ocf_cleaner_fire_flush_cache(struct ocf_request *req)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ocf_io_configure(io, 0, 0, OCF_WRITE, 0, 0);
|
||||
ocf_io_configure(io, 0, 0, OCF_WRITE, 0, 0);
|
||||
ocf_io_set_cmpl(io, req, NULL, _ocf_cleaner_flush_cache_io_end);
|
||||
|
||||
ocf_dobj_submit_flush(io);
|
||||
@ -941,7 +941,6 @@ void ocf_cleaner_fire(struct ocf_cache *cache,
|
||||
if (err)
|
||||
_ocf_cleaner_fire_error(master, req, err);
|
||||
req = NULL;
|
||||
i_out = 0;
|
||||
}
|
||||
|
||||
/* prevent cleaning completion race */
|
||||
|
@ -41,7 +41,7 @@ void ocf_lst_sort(struct ocf_lst *lst)
|
||||
} else {
|
||||
/* search for place where put element at the list */
|
||||
struct ocf_lst_entry *pos;
|
||||
ocf_cache_line_t pos_idx = lst->invalid;
|
||||
ocf_cache_line_t pos_idx;
|
||||
|
||||
for_each_lst(lst, pos, pos_idx)
|
||||
if (lst->cmp(lst->cache, pos, iter) > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user