The cleaning metadata has been deinitialized in the previous pipeline step
together with other services
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Flushing metadata has nothing to do with dinitializing services so it
should be a separate step in the stop pipeline
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Move flushing metadata outside cache_detinit_services(), so the function
can be shared between stop() and detach() without redundant ifs.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
The completion callback is called only in the cache stop scenario, after
flushing the metadata
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
GCC/Clang sanitizer can be used together with PyOCF to catch some errors during
testing.
CC was purposely removed from the Makefile. It always points to GCC on Linux
by default. This allows to change the compiler and its options during the run
of the script
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This resets count_pages_variable on cache-detach, so during the following
cache-attach metadata size is calculated properly.
Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
During core remove/detach ocf_cleaner_refcnt_freeze was called only
when cache was attached, but ocf_cleaner_refcnt_unfreeze was called
regardless of cache state.
Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
Cache attach operation is not supposed to complete unless all the d2c
requests are completed, thus need to handle it asynchronously.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
After attaching new cache device handle all the IOs in Pass-Through mode
until all the d2c requests are completed.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
The flag isn't reset before retraversation so it might be true even if cache
line was reparted in the meantime
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Resetting cache_error/core_error in ocf_req_forward_* functions may lead
to overwriting already reported error if the forward is being done in the
loop.
To avoid this potential problem, introduce set of forward init functions
intended to be called before the entire forward operation, which resets
the error code and sets a forward callback.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
We skip cleaning the mapping and moving the cache line to the free list
in a situation when there are waiters on the cache line lock.
Refrain from decrementing core stats in that situation as well, and let
repart of the waiter request do the updates as needed.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>