bdev_fio: use the new bdev_get_zone_id() helper
Use the new bdev_get_zone_id() helper when calculating the zslba. Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Change-Id: I370a9ea3f82368e7b1a764bf221378797defe6b0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10181 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
b7ad5b0b90
commit
66f7c55ed5
@ -745,8 +745,7 @@ spdk_fio_zone_bytes_to_blocks(struct spdk_bdev *bdev, uint64_t offset_bytes, uin
|
||||
uint64_t num_bytes, uint64_t *num_blocks)
|
||||
{
|
||||
uint32_t block_size = spdk_bdev_get_block_size(bdev);
|
||||
*zone_start = (offset_bytes / (spdk_bdev_get_zone_size(bdev) * block_size)) *
|
||||
spdk_bdev_get_zone_size(bdev);
|
||||
*zone_start = spdk_bdev_get_zone_id(bdev, offset_bytes / block_size);
|
||||
*num_blocks = num_bytes / block_size;
|
||||
return (offset_bytes % block_size) | (num_bytes % block_size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user