Spdk/test/unit/lib
Shuhei Matsumoto 95975beb1c 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-09 17:58:11 +08:00
..
accel accel: append support for crc32c 2023-05-09 17:58:11 +08:00
bdev bdev: Copy command fallback supports split to make copy size unlimited 2023-05-09 17:58:11 +08:00
blob blob: esnap clones are not clones 2023-05-09 17:58:11 +08:00
blobfs update Intel copyright notices 2022-11-10 08:28:53 +00:00
dma Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
env_dpdk update Intel copyright notices 2022-11-10 08:28:53 +00:00
event thread: use spdk_thread_get_app_thread instead of _spdk_get_app_thread 2023-02-24 12:46:27 +00:00
ftl update Intel copyright notices 2022-11-10 08:28:53 +00:00
idxd update Intel copyright notices 2022-11-10 08:28:53 +00:00
init subsystem: assert all subsystems initialized on app thread 2022-11-23 08:22:04 +00:00
ioat update Intel copyright notices 2022-11-10 08:28:53 +00:00
iscsi iscsi: fix segfault when r2t 2022-11-29 17:21:18 +00:00
json json: add spdk_json_write_named_double 2022-11-22 10:01:43 +00:00
jsonrpc update Intel copyright notices 2022-11-10 08:28:53 +00:00
log log: add deprecated tracking API 2022-12-07 17:45:53 +00:00
lvol lvol: esnap clones must end on cluster boundary 2023-05-09 17:58:11 +08:00
notify update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme nvmf/tcp: Wait for PDUs to release when closing a qpair 2023-05-09 17:58:11 +08:00
nvmf ut/fc: Cleanup transport cleanup tests 2023-05-09 17:58:11 +08:00
rdma rdma: Maintain per device PD which is persistent across reconnect 2022-08-12 08:59:43 +00:00
reduce bdev/compress: Port to use accel_fw instead of compressdev 2023-01-20 10:26:21 +00:00
rpc update Intel copyright notices 2022-11-10 08:28:53 +00:00
scsi update Intel copyright notices 2022-11-10 08:28:53 +00:00
sock sock: change min recv/send buf sizes to 4 KiB 2023-04-04 07:36:23 +00:00
thread thread: Move iobuf code to a separate compilation unit. 2023-05-09 17:58:11 +08:00
util util/pipe: Track full condition with a separate bool 2023-04-05 19:19:21 +00:00
vhost UT/vhost/vhost.c:add the test of spdk_blk_construct 2023-05-09 17:58:11 +08:00
json_mock.c virtio_blk: add dump opts 2023-01-20 18:57:38 +00:00
Makefile build: rely on configure to select which unit tests to build 2023-03-28 06:57:40 +00:00