Keep stop pipeline in struct cache.

To eliminate possibility of allocation error in cache stop, pipeline is
allocated on attach.

Due this change, the only possible non-zero status of  ocf_mngt_cache_stop() is
just a warning and cache is always stopped after executing it.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-12-23 12:15:09 -05:00
parent 28caa25b7a
commit 6ac3195823
2 changed files with 223 additions and 213 deletions

View File

@@ -14,6 +14,7 @@
#include "metadata/metadata_partition_structs.h"
#include "metadata/metadata_updater_priv.h"
#include "utils/utils_list.h"
#include "utils/utils_pipeline.h"
#include "utils/utils_refcnt.h"
#include "utils/utils_async_lock.h"
#include "ocf_stats_priv.h"
@@ -167,6 +168,8 @@ struct ocf_cache {
struct ocf_trace trace;
ocf_pipeline_t stop_pipeline;
void *priv;
};