mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-23 00:07:07 +03:00
Fix bdev_logical_block_size()
We were returning sectors instead of bytes. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
23dc00de78
commit
b4afc1fa26
@ -128,12 +128,10 @@ unsigned bdev_logical_block_size(struct block_device *bdev)
|
||||
BUG_ON(ret);
|
||||
|
||||
if (!S_ISBLK(statbuf.st_mode))
|
||||
return statbuf.st_blksize >> 9;
|
||||
return statbuf.st_blksize;
|
||||
|
||||
ret = ioctl(bdev->bd_fd, BLKPBSZGET, &blksize);
|
||||
BUG_ON(ret);
|
||||
|
||||
return blksize >> 9;
|
||||
xioctl(bdev->bd_fd, BLKPBSZGET, &blksize);
|
||||
return blksize;
|
||||
}
|
||||
|
||||
sector_t get_capacity(struct gendisk *disk)
|
||||
|
Loading…
Reference in New Issue
Block a user