mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
hd-geometry: Cut out block layer translation middleman
hd_geometry_guess() picks geometry and translation. Callers can get the geometry directly, via parameters, but for translation they need to go through the block layer. Add a parameter for translation, so it can optionally be gotten just like geometry. In preparation of purging translation from the block layer, which will happen later in this series. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
dc28c0cd30
commit
e2f3dc2b6a
5 changed files with 20 additions and 11 deletions
|
@ -623,7 +623,7 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, VirtIOBlkConf *blk)
|
|||
s->blk = blk;
|
||||
s->rq = NULL;
|
||||
s->sector_mask = (s->conf->logical_block_size / BDRV_SECTOR_SIZE) - 1;
|
||||
hd_geometry_guess(s->bs, &cylinders, &heads, &secs);
|
||||
hd_geometry_guess(s->bs, &cylinders, &heads, &secs, NULL);
|
||||
|
||||
s->vq = virtio_add_queue(&s->vdev, 128, virtio_blk_handle_output);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue