Commit d8d1a4dd authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

bdev/passthru: Use ext bdev API



Fixes commit c3a58489 where support of memory
domains was added without usage of the ext API

Signed-off-by: default avatarAlexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ia0d7132f11c233e334965669ab0d237c24074745
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15088


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 avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent 21db73f9
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -232,11 +232,11 @@ pt_read_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io, boo
		return;
	}

	if (bdev_io->u.bdev.md_buf == NULL) {
		rc = spdk_bdev_readv_blocks(pt_node->base_desc, pt_ch->base_ch, bdev_io->u.bdev.iovs,
	if (bdev_io->u.bdev.ext_opts) {
		rc = spdk_bdev_readv_blocks_ext(pt_node->base_desc, pt_ch->base_ch, bdev_io->u.bdev.iovs,
						bdev_io->u.bdev.iovcnt, bdev_io->u.bdev.offset_blocks,
						bdev_io->u.bdev.num_blocks, _pt_complete_io,
					    bdev_io);
						bdev_io, bdev_io->u.bdev.ext_opts);
	} else {
		rc = spdk_bdev_readv_blocks_with_md(pt_node->base_desc, pt_ch->base_ch,
						    bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
@@ -282,11 +282,11 @@ vbdev_passthru_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *b
				     bdev_io->u.bdev.num_blocks * bdev_io->bdev->blocklen);
		break;
	case SPDK_BDEV_IO_TYPE_WRITE:
		if (bdev_io->u.bdev.md_buf == NULL) {
			rc = spdk_bdev_writev_blocks(pt_node->base_desc, pt_ch->base_ch, bdev_io->u.bdev.iovs,
		if (bdev_io->u.bdev.ext_opts) {
			rc = spdk_bdev_writev_blocks_ext(pt_node->base_desc, pt_ch->base_ch, bdev_io->u.bdev.iovs,
							 bdev_io->u.bdev.iovcnt, bdev_io->u.bdev.offset_blocks,
							 bdev_io->u.bdev.num_blocks, _pt_complete_io,
						     bdev_io);
							 bdev_io, bdev_io->u.bdev.ext_opts);
		} else {
			rc = spdk_bdev_writev_blocks_with_md(pt_node->base_desc, pt_ch->base_ch,
							     bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,