ZERO_BUFFER_SIZE is in bytes but it is easier to calculate max write_zeroes in blocks first and then get the minimum between max write_zeroes in blocks and remaining_num_blocks rather than converting remaining_num_blocks to num_bytes. This is helpful to store the result into bdev->max_write_zeroes for fallback case. We have one small fix in this patch. As we recently fixed bdev_io_get_max_buf_len(), to get aligned length, spdk_bdev_get_buf_align() - 1 is correct. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I104bc837c9eee1303664bfdb3559b0e840d6f0e5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17910 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> |
||
---|---|---|
.. | ||
bdev_internal.h | ||
bdev_rpc.c | ||
bdev_zone.c | ||
bdev.c | ||
Makefile | ||
part.c | ||
scsi_nvme.c | ||
spdk_bdev.map | ||
vtune.c |