block/export: use VIRTIO_BLK_SECTOR_BITS
commit524bac0744e5abf95856fb9e31c01fd2ef102188
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 23 Feb 2021 14:46:49 +0000 (23 14:46 +0000)
committerKevin Wolf <kwolf@redhat.com>
Mon, 8 Mar 2021 13:56:54 +0000 (8 14:56 +0100)
tree5d042e488f920ec5061e8930ed0b8087c84ee8fc
parenta4f1542af58fd6ab061e594d4e161f1c8b4a4372
block/export: use VIRTIO_BLK_SECTOR_BITS

Use VIRTIO_BLK_SECTOR_BITS and VIRTIO_BLK_SECTOR_SIZE when dealing with
virtio-blk sector numbers. Although the values happen to be the same as
BDRV_SECTOR_BITS and BDRV_SECTOR_SIZE, they are conceptually different.
This makes it clearer when we are dealing with virtio-blk sector units.

Use VIRTIO_BLK_SECTOR_BITS in vu_blk_initialize_config(). Later patches
will use it the new constants the virtqueue request processing code
path.

Suggested-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20210223144653.811468-9-stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/export/vhost-user-blk-server.c