Use ref counter to track attach state

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2019-04-09 14:22:33 -04:00
parent 979f51612f
commit dc716d6a08
7 changed files with 29 additions and 44 deletions

View File

@@ -172,11 +172,9 @@ struct ocf_cache {
struct {
struct ocf_refcnt dirty;
struct ocf_refcnt metadata;
} refcnt;
env_atomic pending_cache_requests;
env_waitqueue pending_cache_wq;
uint32_t fallback_pt_error_threshold;
env_atomic fallback_pt_error_counter;
@@ -197,9 +195,6 @@ struct ocf_cache {
env_atomic flush_in_progress;
/* 1 if cache device attached, 0 otherwise */
env_atomic attached;
env_atomic cleaning[OCF_IO_CLASS_MAX];
struct ocf_cleaner cleaner;