pyocf: rio: Fix offset
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
parent
16830cd3c3
commit
d892e3b0d5
@ -125,7 +125,7 @@ class Rio:
|
||||
|
||||
def run(self):
|
||||
iogen = IoGen(
|
||||
(self.jobspec.offset, self.jobspec.size - self.jobspec.offset),
|
||||
(self.jobspec.offset, self.jobspec.size),
|
||||
self.jobspec.bs,
|
||||
self.jobspec.randseed + hash(self.name),
|
||||
self.jobspec.readwrite.is_random(),
|
||||
@ -136,11 +136,9 @@ class Rio:
|
||||
self.finish_time = datetime.now() + self.jobspec.time
|
||||
else:
|
||||
if int(self.jobspec.io_size) != 0:
|
||||
self.io_target = min(
|
||||
self.jobspec.io_size, self.jobspec.size - self.jobspec.offset
|
||||
)
|
||||
self.io_target = min(self.jobspec.io_size, self.jobspec.size)
|
||||
else:
|
||||
self.io_target = self.jobspec.size - self.jobspec.offset
|
||||
self.io_target = self.jobspec.size
|
||||
|
||||
# TODO randrw
|
||||
iodir = (
|
||||
|
@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright(c) 2019-2022 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@ -174,7 +175,7 @@ def test_promoted_after_hits_various_thresholds(pyocf_ctx, insertion_threshold,
|
||||
.bs(Size(4096))
|
||||
.offset(last_core_line)
|
||||
.target(vol)
|
||||
.size(Size(4096) + last_core_line)
|
||||
.size(Size(4096))
|
||||
)
|
||||
|
||||
for i in range(insertion_threshold - 1):
|
||||
|
@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright(c) 2022 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@ -81,7 +82,7 @@ def test_test_standby_io_metadata(pyocf_ctx, cacheline_size):
|
||||
.target(cache_vol)
|
||||
.njobs(num_jobs)
|
||||
.readwrite(ReadWrite.RANDWRITE)
|
||||
.size(io_offset + io_size)
|
||||
.size(io_size)
|
||||
.bs(Size.from_KiB(16))
|
||||
.offset(io_offset)
|
||||
.qd(qd)
|
||||
|
Loading…
Reference in New Issue
Block a user