Merge pull request #8 from arutk/fix-stop-error-handling

Abort cache deinit in case of ocf stop fatal error
This commit is contained in:
Michał Mielewczyk 2019-04-12 13:40:36 +02:00 committed by GitHub
commit e2c901de6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1559,6 +1559,8 @@ int cache_mng_exit_instance(ocf_cache_id_t id, int flush)
/* Stop cache device */ /* Stop cache device */
status = _cache_mng_cache_stop_sync(cache); status = _cache_mng_cache_stop_sync(cache);
if (status && status != -OCF_ERR_WRITE_CACHE)
goto unlock;
if (!status && flush_status) if (!status && flush_status)
status = -KCAS_ERR_STOPPED_DIRTY; status = -KCAS_ERR_STOPPED_DIRTY;