bdev/nvme: directly call bdev_nvme_io_complete for FLUSH IO
Directly call bdev_nvme_io_complete() for FLUSH case. This is a preparation for io_outstanding update in nvme_io_path. For IO sent to a namespace, io_outstanding gets increment/decrement. For IO sent to a controller, io_outstanding is not updated. For FLUSH case, it's not sent to a namespace nor a controller. Directly call bdev_nvme_io_complete() here to make it easier to understand why io_outstanding not gets updated for FLUSH. Change-Id: Idcf4b37a0816a327256fe87004705fb65df1b06c Signed-off-by: Richael Zhuang <richael.zhuang@arm.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15517 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
85478eccc9
commit
141fb10ea2
@ -1384,14 +1384,6 @@ bdev_nvme_destruct(void *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
bdev_nvme_flush(struct nvme_bdev_io *bio, uint64_t offset, uint64_t nbytes)
|
||||
{
|
||||
bdev_nvme_io_complete(bio, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
bdev_nvme_create_qpair(struct nvme_qpair *nvme_qpair)
|
||||
{
|
||||
@ -2160,9 +2152,7 @@ bdev_nvme_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_i
|
||||
bdev_nvme_reset_io(nbdev_ch, nbdev_io);
|
||||
break;
|
||||
case SPDK_BDEV_IO_TYPE_FLUSH:
|
||||
rc = bdev_nvme_flush(nbdev_io,
|
||||
bdev_io->u.bdev.offset_blocks,
|
||||
bdev_io->u.bdev.num_blocks);
|
||||
bdev_nvme_io_complete(nbdev_io, 0);
|
||||
break;
|
||||
case SPDK_BDEV_IO_TYPE_ZONE_APPEND:
|
||||
rc = bdev_nvme_zone_appendv(nbdev_io,
|
||||
|
Loading…
Reference in New Issue
Block a user