pyocf: submit_flush() and submit_dicard()
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
efd6389e74
commit
2de7b9d8f2
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright(c) 2019-2021 Intel Corporation
|
||||
# Copyright(c) 2019-2022 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@ -98,6 +98,12 @@ class Io(Structure):
|
||||
def submit(self):
|
||||
return OcfLib.getInstance().ocf_core_submit_io_wrapper(byref(self))
|
||||
|
||||
def submit_flush(self):
|
||||
return OcfLib.getInstance().ocf_core_submit_flush_wrapper(byref(self))
|
||||
|
||||
def submit_discard(self):
|
||||
return OcfLib.getInstance().ocf_core_submit_discard_wrapper(byref(self))
|
||||
|
||||
def set_data(self, data: Data, offset: int = 0):
|
||||
self.data = data
|
||||
OcfLib.getInstance().ocf_io_set_data(byref(self), data, offset)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -34,3 +34,13 @@ void ocf_core_submit_io_wrapper(struct ocf_io *io)
|
||||
ocf_core_submit_io(io);
|
||||
}
|
||||
|
||||
|
||||
void ocf_core_submit_flush_wrapper(struct ocf_io *io)
|
||||
{
|
||||
ocf_core_submit_flush(io);
|
||||
}
|
||||
|
||||
void ocf_core_submit_discard_wrapper(struct ocf_io *io)
|
||||
{
|
||||
ocf_core_submit_discard(io);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user