[dm-devel] [PATCH] dm-zoned: Fix overflow when converting zone ID to sectors

Damien Le Moal damien.lemoal at wdc.com
Tue Jul 11 01:52:15 UTC 2017


Bart,

On 7/11/17 01:25, Bart Van Assche wrote:
> On Mon, 2017-07-03 at 15:44 +0900, Damien Le Moal wrote:
>> A zone ID is a 32 bits unsigned int which can overflow when doing the
>> bit shifts calculations in dmz_start_sect(). With a 256 MB zone size
>> drive, the overflow happens for a zone ID >= 8192.
> 
> Does the data from this example apply to a sector size of 512 bytes only?
> Should this be mentioned in the patch description?

This is with BIO level 512B sectors addressing unit, which is used even
with 4K LBA drives. So I did not mention it. I should have to be clear.

Best regards.

-- 
Damien Le Moal,
Western Digital




More information about the dm-devel mailing list