block: remove the bd_block_size field from struct block_device
We can trivially calculate the block size from the inodes i_blkbits variable. Use that instead of keeping two redundant copies of the information in slightly different formats. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
5ff9f19231
commit
6b7b181b67
@@ -1543,7 +1543,7 @@ static inline unsigned int blksize_bits(unsigned int size)
|
||||
|
||||
static inline unsigned int block_size(struct block_device *bdev)
|
||||
{
|
||||
return bdev->bd_block_size;
|
||||
return 1 << bdev->bd_inode->i_blkbits;
|
||||
}
|
||||
|
||||
int kblockd_schedule_work(struct work_struct *work);
|
||||
|
Reference in New Issue
Block a user