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

bdev/part: Call bdev*_with_md even if md is NULL



The bdev*_with_md APIs now allow to pass NULL md
pointer, so calling this function without checking
for metadata simplifies code

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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 c89891ea
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/*   SPDX-License-Identifier: BSD-3-Clause
 *   Copyright (c) Intel Corporation.
 *   Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES.
 *   All rights reserved.
 */

@@ -292,7 +293,7 @@ spdk_bdev_part_submit_request_ext(struct spdk_bdev_part_channel *ch, struct spdk
	/* Modify the I/O to adjust for the offset within the base bdev. */
	switch (bdev_io->type) {
	case SPDK_BDEV_IO_TYPE_READ:
		if (bdev_io->u.bdev.ext_opts || !bdev_io->u.bdev.md_buf) {
		if (bdev_io->u.bdev.ext_opts) {
			rc = spdk_bdev_readv_blocks_ext(base_desc, base_ch, bdev_io->u.bdev.iovs,
							bdev_io->u.bdev.iovcnt, remapped_offset,
							bdev_io->u.bdev.num_blocks,
@@ -313,7 +314,7 @@ spdk_bdev_part_submit_request_ext(struct spdk_bdev_part_channel *ch, struct spdk
			return SPDK_BDEV_IO_STATUS_FAILED;
		}

		if (bdev_io->u.bdev.ext_opts || !bdev_io->u.bdev.md_buf) {
		if (bdev_io->u.bdev.ext_opts) {
			rc = spdk_bdev_writev_blocks_ext(base_desc, base_ch, bdev_io->u.bdev.iovs,
							 bdev_io->u.bdev.iovcnt, remapped_offset,
							 bdev_io->u.bdev.num_blocks,