pyocf: use generic volume submit in io class
.. instead of submit_core(). This will enable to reuse Io class
for cache exported object I/O.
@@ -96,13 +96,13 @@ class Io(Structure):
self.del_object()
def submit(self):
- return OcfLib.getInstance().ocf_core_submit_io_wrapper(byref(self))
+ return OcfLib.getInstance().ocf_volume_submit_io(byref(self))
def submit_flush(self):
- return OcfLib.getInstance().ocf_core_submit_flush_wrapper(byref(self))
+ return OcfLib.getInstance().ocf_volume_submit_flush(byref(self))
def submit_discard(self):
- return OcfLib.getInstance().ocf_core_submit_discard_wrapper(byref(self))
+ return OcfLib.getInstance().ocf_volume_submit_discard(byref(self))
def set_data(self, data: Data, offset: int = 0):
self.data = data
@@ -122,3 +122,12 @@ lib.ocf_core_new_io_wrapper.restype = c_void_p
lib.ocf_io_set_data.argtypes = [POINTER(Io), c_void_p, c_uint32]
lib.ocf_io_set_data.restype = c_int
+
+lib.ocf_volume_submit_io.argtypes = [POINTER(Io)]
+lib.ocf_volume_submit_io.restype = None
+
+lib.ocf_volume_submit_flush.argtypes = [POINTER(Io)]
+lib.ocf_volume_submit_flush.restype = None
+
+lib.ocf_volume_submit_discard.argtypes = [POINTER(Io)]
+lib.ocf_volume_submit_discard.restype = None
