summaryrefslogtreecommitdiff
path: root/drivers/hsi
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2017-07-26 17:32:23 +0300
committerMichael S. Tsirkin <mst@redhat.com>2017-08-25 21:37:15 +0300
commit1046d304900cf9d4b2c730c6860b8e03cc704377 (patch)
tree4864cdf0ac8de4541ed6067e23eec9252d9b55de /drivers/hsi
parent14ccee78fc82f5512908f4424f541549a5705b89 (diff)
downloadlinux-1046d304900cf9d4b2c730c6860b8e03cc704377.tar.xz
virtio_blk: fix incorrect message when disk is resized
The message printed on disk resize is incorrect. The following is printed when resizing to 2 GiB: $ truncate -s 1G test.img $ qemu -device virtio-blk-pci,logical_block_size=4096,... (qemu) block_resize drive1 2G virtio_blk virtio0: new size: 4194304 4096-byte logical blocks (17.2 GB/16.0 GiB) The virtio_blk capacity config field is in 512-byte sector units regardless of logical_block_size as per the VIRTIO specification. Therefore the message should read: virtio_blk virtio0: new size: 524288 4096-byte logical blocks (2.15 GB/2.0 GiB) Note that this only affects the printed message. Thankfully the actual block device has the correct size because the block layer expects capacity in sectors. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/hsi')
0 files changed, 0 insertions, 0 deletions