Spdk/test/unit/lib/bdev
Shuhei Matsumoto 0c1df53e7a bdev: Copy command fallback supports split to make copy size unlimited
The generic bdev layer has a fallback meachanism for the copy command
used when the backend bdev module does not support it. However, its max
size is limited. To remove the limitation, the fallback supports split by
using the unified split logic rather than following the write zeroes
command.

bdev_copy_should_split() and bdev_copy_split() use spdk_bdev_get_max_copy()
rather then referring bdev->max_copy to include the fallback case.

Then, spdk_bdev_copy_blocks() does the following.

If the copy size is large and should be split, use the generic split
logic regardless of whether copy is supported or not.
If copy is supported, send the copy request, or if copy is not
supported, emulate it using regulard read and write requests.

Add unit test case to verify this addition.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Iaf51db56bb4b95f99a0ea7a0237d8fa8ae039a54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17073
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-05-03 16:01:48 +00:00
..
bdev_zone.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev.c bdev: Copy command fallback supports split to make copy size unlimited 2023-05-03 16:01:48 +00:00
compress.c bdev/compress: Port to use accel_fw instead of compressdev 2023-01-20 10:26:21 +00:00
crypto.c bdev/crypto: complete IOs on ENOMEM from accel 2023-04-19 06:36:20 +00:00
gpt update Intel copyright notices 2022-11-10 08:28:53 +00:00
mt accel: make spdk_accel_sequence_finish() void 2023-04-19 06:36:20 +00:00
nvme test/unit: add missing jsonrpc stubs 2023-03-28 06:57:59 +00:00
part.c bdev: Calculate max_copy once at bdev registration for fallback case 2023-05-03 16:01:48 +00:00
raid bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io 2023-02-16 10:09:35 +00:00
scsi_nvme.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
vbdev_lvol.c vbdev_lvol: esnap memdomain support 2023-05-02 18:32:19 +00:00
vbdev_zone_block.c bdev: add claim type 2023-01-05 23:28:32 +00:00
Makefile bdev/pmem: Removing bdev pmem - updated tests 2023-03-09 09:21:23 +00:00