Calculation of max copy size for fallback case includes division and is costly. The result is constant for each bdev. Hence we can calculate it only once and store it into bdev->max_copy at bdev registration. Calculation of max copy size for fallback case is almost same as calculation of max write zero size for fallback case. To reuse the calculation, the helper function is named as bdev_get_max_write() and has a num_bytes parameter. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: Iac83a1f16b908d8b36b51d9c51782de40313b6c8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17909 Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot |
||
---|---|---|
.. | ||
Makefile | ||
part_ut.c |