Re: [PATCH] target/iblock: use ilog2 to compute block size

From: Arnd Bergmann
Date: Wed Jun 22 2016 - 11:52:10 EST


On Wednesday, June 22, 2016 6:38:09 AM CEST Christoph Hellwig wrote:
> This doesn't compute the block size, it computes the number of block
> in a block device.

Right, that's at least what I planned to put in the $subject ;-)

> I think it would be useful to add a generic helper
> (e.g. in blkdev.h) as this calculation seems to be open coded in various
> places.

Good idea, I'll try to come up with a patch for that.

Arnd