Patchwork raw-posix: don't assign bs->read_only

login
register
mail settings
Submitter Christoph Hellwig
Date April 7, 2010, 11:58 a.m.
Message ID <20100407115806.GC12452@lst.de>
Download mbox | patch
Permalink /patch/49602/
State New
Headers show

Comments

Christoph Hellwig - April 7, 2010, 11:58 a.m.
bdrv_open already takes care of this for us.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Kevin Wolf - April 7, 2010, 12:38 p.m.
Am 07.04.2010 13:58, schrieb Christoph Hellwig:
> bdrv_open already takes care of this for us.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: qemu/block/raw-posix.c
> ===================================================================
> --- qemu.orig/block/raw-posix.c	2010-04-07 13:50:16.573261199 +0200
> +++ qemu/block/raw-posix.c	2010-04-07 13:50:25.180005926 +0200
> @@ -142,7 +142,6 @@ static int raw_open_common(BlockDriverSt
>          s->open_flags |= O_RDWR;
>      } else {
>          s->open_flags |= O_RDONLY;
> -        bs->read_only = 1;
>      }
>  
>      /* Use O_DSYNC for write-through caching, no flags for write-back caching,

Acked-by: Kevin Wolf <kwolf@redhat.com>
Aurelien Jarno - April 10, 2010, 12:22 a.m.
On Wed, Apr 07, 2010 at 01:58:06PM +0200, Christoph Hellwig wrote:
> bdrv_open already takes care of this for us.

Thanks, applied.

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: qemu/block/raw-posix.c
> ===================================================================
> --- qemu.orig/block/raw-posix.c	2010-04-07 13:50:16.573261199 +0200
> +++ qemu/block/raw-posix.c	2010-04-07 13:50:25.180005926 +0200
> @@ -142,7 +142,6 @@ static int raw_open_common(BlockDriverSt
>          s->open_flags |= O_RDWR;
>      } else {
>          s->open_flags |= O_RDONLY;
> -        bs->read_only = 1;
>      }
>  
>      /* Use O_DSYNC for write-through caching, no flags for write-back caching,
> 
> 
>

Patch

Index: qemu/block/raw-posix.c
===================================================================
--- qemu.orig/block/raw-posix.c	2010-04-07 13:50:16.573261199 +0200
+++ qemu/block/raw-posix.c	2010-04-07 13:50:25.180005926 +0200
@@ -142,7 +142,6 @@  static int raw_open_common(BlockDriverSt
         s->open_flags |= O_RDWR;
     } else {
         s->open_flags |= O_RDONLY;
-        bs->read_only = 1;
     }
 
     /* Use O_DSYNC for write-through caching, no flags for write-back caching,