Patchwork Remove un-needed code

login
register
mail settings
Submitter Bruce Rogers
Date April 12, 2010, 12:56 p.m.
Message ID <4BC2C4000200004800092C4D@sinclair.provo.novell.com>
Download mbox | patch
Permalink /patch/49967/
State New
Headers show

Comments

Bruce Rogers - April 12, 2010, 12:56 p.m.
The bdrv_set_geometry_hint call below is not needed - it's just setting what was just read.

Signed-off-by: Bruce Rogers <brogers@novell.com >
Kevin Wolf - April 12, 2010, 1:08 p.m.
Am 12.04.2010 14:56, schrieb Bruce Rogers:
> The bdrv_set_geometry_hint call below is not needed - it's just setting what was just read.
> 
> Signed-off-by: Bruce Rogers <brogers@novell.com >

Almost. ;-) I fixed that additional space for you and applied the patch
to the block branch.

Kevin

> 
> diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
> index 9915840..bc4fa77 100644
> --- a/hw/virtio-blk.c
> +++ b/hw/virtio-blk.c
> @@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *conf)
>      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);
> 
> 
> 
>

Patch

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 9915840..bc4fa77 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -494,7 +494,6 @@  VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *conf)
     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);