OSDN Git Service

block: drop BlockDriverState::read_only
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 27 May 2021 15:40:55 +0000 (18:40 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 2 Jun 2021 12:23:20 +0000 (14:23 +0200)
commit975da073748ecb271d8ba2a7711ff46a8c6d8366
treeafead59562f330798891f112773c789b7ecb82b8
parent307261b243df2edde538f3ed5c9d80e168529355
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>
block.c
include/block/block_int.h
tests/unit/test-block-iothread.c