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> |
||
---|---|---|
.. | ||
bdev_ut.c | ||
Makefile |