bdev/nvme: Add nvme_ch parameter to bdev_nvme_flush()

bdev_nvme_flush() just completes with success now and uses only
bio parameter now, but matching parameters with other similar I/O
APIs will be good for future enhancement and following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I64be668fa781396ef68b6b506b22cb153d7b6850
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5203
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-11-23 13:25:16 +09:00 committed by Tomasz Zawadzki
parent 1a8c6c4d4a
commit e979e1fd37

View File

@ -295,8 +295,8 @@ bdev_nvme_destruct(void *ctx)
} }
static int static int
bdev_nvme_flush(struct nvme_bdev_ns *nvme_ns, struct nvme_bdev_io *bio, bdev_nvme_flush(struct nvme_bdev_ns *nvme_ns, struct nvme_io_channel *nvme_ch,
uint64_t offset, uint64_t nbytes) struct nvme_bdev_io *bio, uint64_t offset, uint64_t nbytes)
{ {
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(bio), SPDK_BDEV_IO_STATUS_SUCCESS); spdk_bdev_io_complete(spdk_bdev_io_from_ctx(bio), SPDK_BDEV_IO_STATUS_SUCCESS);
@ -701,6 +701,7 @@ _bdev_nvme_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_
case SPDK_BDEV_IO_TYPE_FLUSH: case SPDK_BDEV_IO_TYPE_FLUSH:
return bdev_nvme_flush(nbdev->nvme_ns, return bdev_nvme_flush(nbdev->nvme_ns,
nvme_ch,
nbdev_io, nbdev_io,
bdev_io->u.bdev.offset_blocks, bdev_io->u.bdev.offset_blocks,
bdev_io->u.bdev.num_blocks); bdev_io->u.bdev.num_blocks);