From 2de7b9d8f23a58947b0e2ca2f92992f015677d04 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Thu, 21 Oct 2021 10:47:28 +0200 Subject: [PATCH] pyocf: submit_flush() and submit_dicard() Signed-off-by: Adam Rutkowski --- tests/functional/pyocf/types/io.py | 8 +++++++- tests/functional/pyocf/wrappers/ocf_io_wrappers.c | 12 +++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/functional/pyocf/types/io.py b/tests/functional/pyocf/types/io.py index 467e3a8..dfc0471 100644 --- a/tests/functional/pyocf/types/io.py +++ b/tests/functional/pyocf/types/io.py @@ -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) diff --git a/tests/functional/pyocf/wrappers/ocf_io_wrappers.c b/tests/functional/pyocf/wrappers/ocf_io_wrappers.c index 776de72..7fe3f01 100644 --- a/tests/functional/pyocf/wrappers/ocf_io_wrappers.c +++ b/tests/functional/pyocf/wrappers/ocf_io_wrappers.c @@ -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); +}