commit | 5fdb7e1b976dc9d18aff8c711e51d17c4c324a0e | [log] [tgz] |
---|---|---|
author | Matias Bjørling <m@bjorling.me> | Mon Aug 31 14:17:31 2015 +0200 |
committer | Jens Axboe <axboe@fb.com> | Wed Sep 02 16:49:42 2015 -0600 |
tree | 599f29381b2aa817a069adbe1c5d84ef0e6c2995 | |
parent | de65d2d26f81f7f84c7258b3a137f20e8fa5bb6a [diff] |
null_blk: fix wrong capacity when bs is not 512 bytes set_capacity() sets device's capacity using 512 bytes sectors. null_blk calculates the number of sectors by size / bs, which set_capacity is called with. This led to null_blk exposing the wrong number of sectors when bs is not 512 bytes. Signed-off-by: Matias Bjørling <m@bjorling.me> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>