Commit fae03566 authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

test/bdevperf: fix issue with overlapping I/Os



A previous fix for miscompare had a slight issue with the scenario
where we chose an offset and then discover that it's already taken
because we've wrapped to this location before the previous IO
completed. In such case, we intended to bump the offset to just go
to the next block however we only bumped the local variable so the
next IO submitted will overwrite the previous.

The fix is simply to use the previously incremented target->offset
and increment it again for the next IO.

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: I26661eb0631ac50cc4f86f42f1d1789d297e204d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1250


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent b5ef8c45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -692,7 +692,7 @@ bdevperf_submit_single(struct io_target *target, struct bdevperf_task *task)
		 */
		if (g_verify && spdk_bit_array_get(target->outstanding, offset_in_ios)) {
			do {
				offset_in_ios++;
				offset_in_ios = target->offset_in_ios++;
				if (target->offset_in_ios == target->size_in_ios) {
					target->offset_in_ios = 0;
				}