diff mbox

[v3,19/19] block: remove keep_read_only flag from BlockDriverState struct

Message ID ed8df9ce22b8eade6bb37dccc796faf32460e980.1347993885.git.jcody@redhat.com
State New
Headers show

Commit Message

Jeff Cody Sept. 18, 2012, 6:53 p.m. UTC
The keep_read_only flag is no longer used, in favor of the bdrv
flag BDRV_O_ALLOW_RDWR.

Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 block.c     | 2 --
 block_int.h | 1 -
 2 files changed, 3 deletions(-)
diff mbox

Patch

diff --git a/block.c b/block.c
index ebdbf61..5db1df1 100644
--- a/block.c
+++ b/block.c
@@ -808,8 +808,6 @@  int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
         flags |= BDRV_O_ALLOW_RDWR;
     }
 
-    bs->keep_read_only = !(flags & BDRV_O_ALLOW_RDWR);
-
     /* Open the image */
     ret = bdrv_open_common(bs, filename, flags, drv);
     if (ret < 0) {
diff --git a/block_int.h b/block_int.h
index 22b3d93..ac4245c 100644
--- a/block_int.h
+++ b/block_int.h
@@ -275,7 +275,6 @@  struct BlockDriverState {
     int64_t total_sectors; /* if we are reading a disk image, give its
                               size in sectors */
     int read_only; /* if true, the media is read only */
-    int keep_read_only; /* if true, the media was requested to stay read only */
     int open_flags; /* flags used to open the file, re-used for re-open */
     int encrypted; /* if true, the media is encrypted */
     int valid_key; /* if true, a valid encryption key has been set */