concat: io metadata support
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com> Change-Id: I4909e8096dbfbeb8bc2f689ab694baf07c76af21 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15129 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
This commit is contained in:
parent
a289f081dd
commit
ba46000561
@ -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);
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user