It's intended to be used in a context, where cache is not initialized
and the io_queue is not available yet.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
struct ocf_io is going to be removed soon (consolidated with ocf_request).
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Skip the ocf_io abstraction and get the data directly from the request.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This is meant to be used in atomic mode to avoid allocating huge buffers
for zeroing data on drive.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Previously every created queue was added to io_queues list, which
made mngt_queue being used in ocf_parallelize. Change mngt_queue creation
API so that mngt_queue is not added to the list and doesn't have
unnecessary functionalities initialized.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This allows to create a Rio prototype object and the copy it for every
invocations so that some parameters can be overwritten without modifying
the prototype object itself.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Make sure end_offset is never generated as 0. Otherwise the last volume
in the range will not get any io, leading false negative test result.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Majority of management operations should be blocked for detached cache,
although adding and removing cores should be possible.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
From python3.11 the function accepts only NoneType, int, float, str, bytes, or
bytearray
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
PyOCF needs to control random seed, to allow running tests with
pytest-xdist. Use local random object initialized with seed
from the config.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
Make Volumes usable by both pyocf and OCF with clear open/_open split
and clean-up of instance/uuid tracking on C interface only.
Signed-off-by: Jan Musial <jan.musial@intel.com>
We need a strong reference to volume for as long as OCF has it open.
For that I changed instance tracking dictionary from weakvalue to
normal. This way I made sure that GC won't clean up Volume before its
closed.
Signed-off-by: Jan Musial <jan.musial@intel.com>