pyocf: cache/core object volume fixes

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2022-04-03 16:33:37 +02:00
parent ebb107f1a1
commit 6a03145acf
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ class CacheVolume(ExpObjVolume):
def open(self):
return Volume.open(
self.lib.ocf_cache_get_front_volume(self.cache.handle),
self.lib.ocf_cache_get_front_volume(self.cache.cache_handle),
self
)

View File

@ -49,10 +49,10 @@ class ExpObjVolume(Volume):
return exp_obj_io
def get_length(self):
return Size.from_B(OcfLib.getInstance().ocf_volume_get_length(self.c_vol))
return Size.from_B(OcfLib.getInstance().ocf_volume_get_length(self.handle))
def get_max_io_size(self):
return Size.from_B(OcfLib.getInstance().ocf_volume_get_max_io_size(self.c_vol))
return Size.from_B(OcfLib.getInstance().ocf_volume_get_max_io_size(self.handle))
def do_submit_io(self, io):
io = self._alloc_io(io)