Commit ba460005 authored by Krzysztof Smolinski's avatar Krzysztof Smolinski Committed by Tomasz Zawadzki
Browse files

concat: io metadata support



Signed-off-by: default avatarKrzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I4909e8096dbfbeb8bc2f689ab694baf07c76af21
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15129


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
parent a289f081
Loading
Loading
Loading
Loading
+24 −8
Original line number Diff line number Diff line
@@ -103,15 +103,31 @@ concat_submit_rw_request(struct raid_bdev_io *raid_io)
	assert(raid_ch->base_channel);
	base_ch = raid_ch->base_channel[pd_idx];
	if (bdev_io->type == SPDK_BDEV_IO_TYPE_READ) {
		if (bdev_io->u.bdev.ext_opts != NULL) {
			ret = spdk_bdev_readv_blocks_ext(base_info->desc, base_ch,
							 bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
							 pd_lba, pd_blocks, concat_bdev_io_completion,
							 raid_io, bdev_io->u.bdev.ext_opts);
		} else {
			ret = spdk_bdev_readv_blocks_with_md(base_info->desc, base_ch,
							     bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
							     bdev_io->u.bdev.md_buf,
							     pd_lba, pd_blocks,
							     concat_bdev_io_completion, raid_io);
		}
	} else if (bdev_io->type == SPDK_BDEV_IO_TYPE_WRITE) {
		if (bdev_io->u.bdev.ext_opts != NULL) {
			ret = spdk_bdev_writev_blocks_ext(base_info->desc, base_ch,
							  bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
							  pd_lba, pd_blocks, concat_bdev_io_completion,
							  raid_io, bdev_io->u.bdev.ext_opts);
		} else {
			ret = spdk_bdev_writev_blocks_with_md(base_info->desc, base_ch,
							      bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
							      bdev_io->u.bdev.md_buf,
							      pd_lba, pd_blocks,
							      concat_bdev_io_completion, raid_io);
		}
	} else {
		SPDK_ERRLOG("Recvd not supported io type %u\n", bdev_io->type);
		assert(0);
+11 −0
Original line number Diff line number Diff line
@@ -13,6 +13,17 @@
#include "bdev/raid/concat.c"
#include "../common.c"

DEFINE_STUB(spdk_bdev_readv_blocks_with_md, int, (struct spdk_bdev_desc *desc,
		struct spdk_io_channel *ch,
		struct iovec *iov, int iovcnt, void *md,
		uint64_t offset_blocks, uint64_t num_blocks,
		spdk_bdev_io_completion_cb cb, void *cb_arg), 0);
DEFINE_STUB(spdk_bdev_writev_blocks_with_md, int, (struct spdk_bdev_desc *desc,
		struct spdk_io_channel *ch,
		struct iovec *iov, int iovcnt, void *md,
		uint64_t offset_blocks, uint64_t num_blocks,
		spdk_bdev_io_completion_cb cb, void *cb_arg), 0);

#define BLOCK_LEN (4096)

enum CONCAT_IO_TYPE {