Commit 2c436c00 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

bdev/ocssd: Get io_channel from not nvme_ch but bdev_io when processing pending requests



The next patch will add nvme_bdev_channel and we will not be able to
io_channel from nvme_ch anymore.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8ba93e66657d21da58df63f3ad6dde4b155fc174
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6612


Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent e1489743
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -724,6 +724,7 @@ bdev_ocssd_poll_pending(void *ctx)
	struct nvme_io_channel *nvme_ch = ctx;
	struct ocssd_io_channel *ocssd_ch;
	struct spdk_bdev_io *bdev_io;
	struct spdk_io_channel *ch;
	TAILQ_HEAD(, spdk_bdev_io) pending_requests;
	int num_requests = 0;

@@ -734,7 +735,8 @@ bdev_ocssd_poll_pending(void *ctx)

	while ((bdev_io = TAILQ_FIRST(&pending_requests))) {
		TAILQ_REMOVE(&pending_requests, bdev_io, module_link);
		bdev_ocssd_submit_request(spdk_io_channel_from_ctx(nvme_ch), bdev_io);
		ch = spdk_bdev_io_get_io_channel(bdev_io);
		bdev_ocssd_submit_request(ch, bdev_io);
		num_requests++;
	}