vhdx: DIV_ROUND_UP() in vhdx_calc_bat_entries()
authorMax Reitz <mreitz@redhat.com>
Fri, 18 Dec 2015 15:04:25 +0000 (16:04 +0100)
committerJeff Cody <jcody@redhat.com>
Mon, 29 Feb 2016 19:54:31 +0000 (14:54 -0500)
commit939901dcd2093a5d6b40420314d1af8b185ec43c
treede8fc5dce5d4a0b1615bd8972f0758c98127b31f
parentb189346eb1784df95ed6fed610411dbf23d19e1f
vhdx: DIV_ROUND_UP() in vhdx_calc_bat_entries()

We have DIV_ROUND_UP(), so we can use it to produce more easily readable
code. It may be slower than the bit shifting currently performed
(because it actually performs a division), but since
vhdx_calc_bat_entries() is never used in a hot path, this is completely
fine.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 1450451066-13335-2-git-send-email-mreitz@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/vhdx.c