[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/3] block: drop BlockDriverState::read_only
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH 0/3] block: drop BlockDriverState::read_only |
Date: |
Thu, 27 May 2021 00:15:31 +0300 |
Hi all!
The field duplicates information in .open_flags. We have to carefully
sync these two fields everywhere. It's simple to introduce a bug by
forgetting it.
Let's drop the field, and fix users to call bdrv_is_read_only() and
bdrv_is_writable() instead.
Vladimir Sementsov-Ogievskiy (3):
block: consistently use bdrv_is_read_only()
block: drop BlockDriverState::read_only
block: drop BlockBackendRootState::read_only
include/block/block_int.h | 2 --
block.c | 16 +++++++---------
block/block-backend.c | 10 ++--------
block/commit.c | 2 +-
block/io.c | 4 ++--
block/qapi.c | 2 +-
block/qcow2-snapshot.c | 2 +-
block/qcow2.c | 4 ++--
block/snapshot.c | 2 +-
block/vhdx-log.c | 2 +-
blockdev.c | 4 +++-
tests/unit/test-block-iothread.c | 6 ------
12 files changed, 21 insertions(+), 35 deletions(-)
--
2.29.2
- [PATCH 0/3] block: drop BlockDriverState::read_only,
Vladimir Sementsov-Ogievskiy <=