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: Alexey Marchuk <alexeymar@nvidia.com> Change-Id: I364a646630bd36120231ea87a41fea05df51befb Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15090 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: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
c89891ea8c
commit
0fec09fc50
@ -1,5 +1,6 @@
|
|||||||
/* SPDX-License-Identifier: BSD-3-Clause
|
/* SPDX-License-Identifier: BSD-3-Clause
|
||||||
* Copyright (c) Intel Corporation.
|
* Copyright (c) Intel Corporation.
|
||||||
|
* Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES.
|
||||||
* All rights reserved.
|
* 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. */
|
/* Modify the I/O to adjust for the offset within the base bdev. */
|
||||||
switch (bdev_io->type) {
|
switch (bdev_io->type) {
|
||||||
case SPDK_BDEV_IO_TYPE_READ:
|
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,
|
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.iovcnt, remapped_offset,
|
||||||
bdev_io->u.bdev.num_blocks,
|
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;
|
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,
|
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.iovcnt, remapped_offset,
|
||||||
bdev_io->u.bdev.num_blocks,
|
bdev_io->u.bdev.num_blocks,
|
||||||
|
Loading…
Reference in New Issue
Block a user