diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-05-27 18:40:55 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-06-02 14:23:20 +0200 |
commit | 975da073748ecb271d8ba2a7711ff46a8c6d8366 (patch) | |
tree | afead59562f330798891f112773c789b7ecb82b8 /include/block/block_int.h | |
parent | 307261b243df2edde538f3ed5c9d80e168529355 (diff) |
block: drop BlockDriverState::read_only
This variable is just a cache for !(bs->open_flags & BDRV_O_RDWR),
which we have to synchronize everywhere. Let's just drop it and
consistently use bdrv_is_read_only().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210527154056.70294-3-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/block_int.h')
-rw-r--r-- | include/block/block_int.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index b2c8b09d0f..09661a134b 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -843,7 +843,6 @@ struct BlockDriverState { * locking needed during I/O... */ int open_flags; /* flags used to open the file, re-used for re-open */ - bool read_only; /* if true, the media is read only */ bool encrypted; /* if true, the media is encrypted */ bool sg; /* if true, the device is a /dev/sg* */ bool probed; /* if true, format was probed rather than specified */ |