Spdk/lib/bdev
Shuhei Matsumoto 2dcaa3851f bdev: Fix max write_zeroes calculation for fallback case
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>
2023-05-03 16:01:48 +00:00
..
bdev_internal.h bdev: add public APIs for IO statictics processing 2023-01-19 01:57:11 +00:00
bdev_rpc.c bdev: always generate UUIDs 2023-04-13 12:12:58 +00:00
bdev_zone.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev.c bdev: Fix max write_zeroes calculation for fallback case 2023-05-03 16:01:48 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
part.c bdev_part: allow UUID to be specified 2023-05-02 18:59:58 +00:00
scsi_nvme.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_bdev.map bdev_part: allow UUID to be specified 2023-05-02 18:59:58 +00:00
vtune.c update Intel copyright notices 2022-11-10 08:28:53 +00:00