Re: [PATCH v2 1/3] block: provide helpers for reading block count

2016-06-27 Thread Davidlohr Bueso
On Thu, 23 Jun 2016, Arnd Bergmann wrote: Several drivers use an expensive do_div() to compute the number of logical or physical blocks in a blockdev, which can be done more efficiently using a shift, since the blocksize is always a power of two number. Let's introduce

Re: [PATCH v2 1/3] block: provide helpers for reading block count

2016-06-27 Thread Davidlohr Bueso
On Thu, 23 Jun 2016, Arnd Bergmann wrote: Several drivers use an expensive do_div() to compute the number of logical or physical blocks in a blockdev, which can be done more efficiently using a shift, since the blocksize is always a power of two number. Let's introduce

Re: [PATCH v2 1/3] block: provide helpers for reading block count

2016-06-23 Thread Sagi Grimberg
Looks good, for the series: Reviewed-by: Sagi Grimbeg

Re: [PATCH v2 1/3] block: provide helpers for reading block count

2016-06-23 Thread Sagi Grimberg
Looks good, for the series: Reviewed-by: Sagi Grimbeg

Re: [PATCH v2 1/3] block: provide helpers for reading block count

2016-06-23 Thread Christoph Hellwig
Thanks Arnd, the series looks fine to me: Reviewed-by: Christoph Hellwig

Re: [PATCH v2 1/3] block: provide helpers for reading block count

2016-06-23 Thread Christoph Hellwig
Thanks Arnd, the series looks fine to me: Reviewed-by: Christoph Hellwig

[PATCH v2 1/3] block: provide helpers for reading block count

2016-06-23 Thread Arnd Bergmann
Several drivers use an expensive do_div() to compute the number of logical or physical blocks in a blockdev, which can be done more efficiently using a shift, since the blocksize is always a power of two number. Let's introduce bdev_logical_block_count() and bdev_physical_block_count() helper

[PATCH v2 1/3] block: provide helpers for reading block count

2016-06-23 Thread Arnd Bergmann
Several drivers use an expensive do_div() to compute the number of logical or physical blocks in a blockdev, which can be done more efficiently using a shift, since the blocksize is always a power of two number. Let's introduce bdev_logical_block_count() and bdev_physical_block_count() helper