Re: [Devel] [PATCH rh7] cbt: blk_cbt_update_size() must return if cbt->block_max not changed

2016-06-09 Thread Dmitry Monakhov
Maxim Patlasov writes: > It's useless to recreate cbt every time as we called for the same > block-device size. Actually, it's worthy only if cbt->block_max > increases. > > Since commit b8e560a299 (fix cbt->block_max calculation), we calculate > cbt->block_max

[Devel] [PATCH rh7] cbt: blk_cbt_update_size() must return if cbt->block_max not changed

2016-06-08 Thread Maxim Patlasov
It's useless to recreate cbt every time as we called for the same block-device size. Actually, it's worthy only if cbt->block_max increases. Since commit b8e560a299 (fix cbt->block_max calculation), we calculate cbt->block_max precisely: > cbt->block_max = (size + blocksize - 1) >>