Skip to content

Commit

Permalink
Enable IO to detached cache instance
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
  • Loading branch information
mmichal10 authored and Rafal Stefanowski committed Jul 10, 2024
1 parent de07458 commit f1bfd94
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/ocf_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,6 @@ static void ocf_core_volume_submit_io(struct ocf_io *io)
core = ocf_volume_to_core(ocf_io_get_volume(io));
cache = ocf_core_get_cache(core);

if (unlikely(!env_bit_test(ocf_cache_state_running,
&cache->cache_state))) {
ocf_io_end(io, -OCF_ERR_CACHE_NOT_AVAIL);
return;
}

if (unlikely(ocf_cache_is_standby(cache))) {
ocf_io_end(io, -OCF_ERR_CACHE_STANDBY);
return;
Expand Down Expand Up @@ -340,12 +334,6 @@ static void ocf_core_volume_submit_flush(struct ocf_io *io)
core = ocf_volume_to_core(ocf_io_get_volume(io));
cache = ocf_core_get_cache(core);

if (unlikely(!env_bit_test(ocf_cache_state_running,
&cache->cache_state))) {
ocf_io_end(io, -OCF_ERR_CACHE_NOT_AVAIL);
return;
}

if (unlikely(ocf_cache_is_standby(cache))) {
ocf_io_end(io, -OCF_ERR_CACHE_STANDBY);
return;
Expand Down Expand Up @@ -383,12 +371,6 @@ static void ocf_core_volume_submit_discard(struct ocf_io *io)
core = ocf_volume_to_core(ocf_io_get_volume(io));
cache = ocf_core_get_cache(core);

if (unlikely(!env_bit_test(ocf_cache_state_running,
&cache->cache_state))) {
ocf_io_end(io, -OCF_ERR_CACHE_NOT_AVAIL);
return;
}

if (unlikely(ocf_cache_is_standby(cache))) {
ocf_io_end(io, -OCF_ERR_CACHE_STANDBY);
return;
Expand Down

0 comments on commit f1bfd94

Please sign in to comment.