pyocf: fix cache save method
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
716edcc637
commit
693c07b865
@ -522,12 +522,12 @@ class Cache:
|
|||||||
if not self.started:
|
if not self.started:
|
||||||
raise Exception("Not started!")
|
raise Exception("Not started!")
|
||||||
|
|
||||||
self.get_and_write_lock()
|
self.write_lock()
|
||||||
c = OcfCompletion([("cache", c_void_p), ("priv", c_void_p), ("error", c_int)])
|
c = OcfCompletion([("cache", c_void_p), ("priv", c_void_p), ("error", c_int)])
|
||||||
self.owner.lib.ocf_mngt_cache_save(self.cache_handle, c, None)
|
self.owner.lib.ocf_mngt_cache_save(self.cache_handle, c, None)
|
||||||
|
|
||||||
c.wait()
|
c.wait()
|
||||||
self.put_and_write_unlock()
|
self.write_unlock()
|
||||||
|
|
||||||
if c.results["error"]:
|
if c.results["error"]:
|
||||||
raise OcfError("Failed saving cache", c.results["error"])
|
raise OcfError("Failed saving cache", c.results["error"])
|
||||||
|
Loading…
Reference in New Issue
Block a user