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: Shuhei 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: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
e1489743ed
commit
2c436c00a0
@ -724,6 +724,7 @@ bdev_ocssd_poll_pending(void *ctx)
|
|||||||
struct nvme_io_channel *nvme_ch = ctx;
|
struct nvme_io_channel *nvme_ch = ctx;
|
||||||
struct ocssd_io_channel *ocssd_ch;
|
struct ocssd_io_channel *ocssd_ch;
|
||||||
struct spdk_bdev_io *bdev_io;
|
struct spdk_bdev_io *bdev_io;
|
||||||
|
struct spdk_io_channel *ch;
|
||||||
TAILQ_HEAD(, spdk_bdev_io) pending_requests;
|
TAILQ_HEAD(, spdk_bdev_io) pending_requests;
|
||||||
int num_requests = 0;
|
int num_requests = 0;
|
||||||
|
|
||||||
@ -734,7 +735,8 @@ bdev_ocssd_poll_pending(void *ctx)
|
|||||||
|
|
||||||
while ((bdev_io = TAILQ_FIRST(&pending_requests))) {
|
while ((bdev_io = TAILQ_FIRST(&pending_requests))) {
|
||||||
TAILQ_REMOVE(&pending_requests, bdev_io, module_link);
|
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++;
|
num_requests++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user