Commit c6e50f7f authored by Jin Yu's avatar Jin Yu Committed by Tomasz Zawadzki
Browse files

bdev: record the submit time



The reset cmd and parent of splited IO would not go into
the _bdev_io_submit() so they don't record the submitted
time. The timeout IO check needs the submitted time so we
add them in this patch.

Change-Id: Ic7217171ec878d4a6dfa80d6635957ca0186928b
Signed-off-by: default avatarJin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476050


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 56de1b00
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1885,6 +1885,7 @@ bdev_io_submit(struct spdk_bdev_io *bdev_io)
	}

	if (bdev->split_on_optimal_io_boundary && bdev_io_should_split(bdev_io)) {
		bdev_io->internal.submit_tsc = spdk_get_ticks();
		bdev_io_split(NULL, bdev_io);
		return;
	}
@@ -3495,6 +3496,7 @@ spdk_bdev_reset(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch,

	bdev_io->internal.ch = channel;
	bdev_io->internal.desc = desc;
	bdev_io->internal.submit_tsc = spdk_get_ticks();
	bdev_io->type = SPDK_BDEV_IO_TYPE_RESET;
	bdev_io->u.reset.ch_ref = NULL;
	bdev_io_init(bdev_io, bdev, cb_arg, cb);