Commit 898bbb66 authored by GangCao's avatar GangCao Committed by Jim Harris
Browse files

bdev: properly handle the io_outstanding count for QoS bdev channel



Change-Id: If9e52b9a16ffff7bd4263bfca85bf7cbaf53984c
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/405868


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent cf4cf8d5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -877,6 +877,7 @@ _spdk_bdev_qos_io_submit(void *ctx)
			bdev_io = TAILQ_FIRST(&ch->qos_io);
			TAILQ_REMOVE(&ch->qos_io, bdev_io, link);
			ch->io_submitted_this_timeslice++;
			ch->io_outstanding++;
			shared_ch->io_outstanding++;
			bdev->fn_table->submit_request(ch->channel, bdev_io);
		} else {
@@ -909,6 +910,7 @@ _spdk_bdev_io_submit(void *ctx)
	} else if (bdev_ch->flags & BDEV_CH_RESET_IN_PROGRESS) {
		spdk_bdev_io_complete(bdev_io, SPDK_BDEV_IO_STATUS_FAILED);
	} else if (bdev_ch->flags & BDEV_CH_QOS_ENABLED) {
		bdev_ch->io_outstanding--;
		shared_ch->io_outstanding--;
		TAILQ_INSERT_TAIL(&bdev_ch->qos_io, bdev_io, link);
		_spdk_bdev_qos_io_submit(bdev_ch);