Remove un-needed code
PATCH 1/1 Remove un-needed code
The set_geometry_hint call below is not needed - it's just setting what was just read.
hw/virtio-blk.c +0 -0
@@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c
onf)
s->rq = NULL;
s->sector_mask = (s->conf->logical_block_size / 512) - 1;
bdrv_guess_geometry(s->bs, &cylinders, &heads, &secs);- bdrv_set_geometry_hint(s->bs, cylinders, heads, secs);
s->vq = virtio_add_queue(&s->vdev, 128, virtio_blk_handle_output);
Am 10.04.2010 00:55, schrieb Bruce Rogers:
Quoted 3 lines
The
set_geometry_hintcall below is not needed - it's just setting what was just read.Signed-off-by Bruce Rogers <[email protected]
It needs to be "Signed-off-by" with lower-case o and b to be recognized by git, and the right angle bracket is missing.
hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c · line 494
Quoted 7 lines
hw/virtio-blk.c +0
-0@@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c onf)
Patch is incorrectly wrapped here.
hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c · line 499
Quoted 6 lines
hw/virtio-blk.c +0
-1s->rq =NULL ; s->sector_mask = (s->conf->logical_block_size /512 ) -1 ;bdrv_guess_geometry (s->bs, &cylinders, &heads, &secs); -bdrv_set_geometry_hint (s->bs, cylinders, heads, secs); s->vq =virtio_add_queue (&s->vdev,128 , virtio_blk_handle_output);
bdrv_guess_geometry is not a simple getter function, but it already calls bdrv_set_geometry_hint itself, so I think the logic is correct.
Kevin
Quoted 25 lines · Kevin Wolf
Am 10.04.2010 00:55, schrieb Bruce Rogers:
Quoted 1 line
The
set_geometry_hintcall below is not needed - it's just setting what wasjust read.
Quoted 2 lines
Signed-off-by Bruce Rogers <[email protected]It needs to be "Signed-off-by" with lower-case o and b to be recognized by git, and the right angle bracket is missing.
hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf
Quoted 6 lines
hw/virtio-blk.c +0
-0@@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf*c
hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf · line 494
Quoted 1 line
hw/virtio-blk.c +0
-0onf)Patch is incorrectly wrapped here.
Quoted 5 lines
hw/virtio-blk.c +0
-1s->rq =NULL ; s->sector_mask = (s->conf->logical_block_size /512 ) -1 ;bdrv_guess_geometry (s->bs, &cylinders, &heads, &secs); -bdrv_set_geometry_hint (s->bs, cylinders, heads, secs);
Quoted 6 lines
hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf · line 499
Quoted 1 line
hw/virtio-blk.c +0
-0s->vq =virtio_add_queue (&s->vdev,128 , virtio_blk_handle_output);
bdrv_guess_geometryis not a simple getter function, but it already callsbdrv_set_geometry_hintitself, so I think the logic is correct.Kevin
I've re-posted with these items fixed. Thanks.
Bruce