zbd: Fix zbd_zone_idx()
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 29 Aug 2018 01:29:02 +0000 (10:29 +0900)
committerDamien Le Moal <damien.lemoal@wdc.com>
Thu, 6 Sep 2018 01:09:10 +0000 (10:09 +0900)
commitcd775e06bb369a23b9c7aab259127f38e8027ca5
tree16482d2f1ce285c0d4396c55292eca7a1efc99d8
parent51ec037c71d3badd9418524d63b8cca549f6ff5d
zbd: Fix zbd_zone_idx()

For a zone size that is not a power of 2 number of sectors,
f->zbd_info->zone_size_log2 is set to -1. So use bit shift in
zbd_zone_idx() only if zone_size_log2 is not negative.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
zbd.c