In reset_device(), if the total number of 512B sectors on the device
is more than INT_MAX then there was a overflow happening, rendering
the nr_sectors as 0, which was causing the failure of the ioctl and
subsequent crash, fix the overflow.
Signed-off-by: Aravind Ramesh <aravind.ramesh@wdc.com>
// zone_size should be in 512B sectors
static seastar::future<> reset_device(
seastar::file &device,
- uint32_t zone_size_sects,
- uint32_t nr_zones)
+ uint64_t zone_size_sects,
+ uint64_t nr_zones)
{
return seastar::do_with(
blk_zone_range{},