qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] block: drop BlockDriverState::read_only
@ 2021-05-26 21:15 Vladimir Sementsov-Ogievskiy
  2021-05-26 21:15 ` [PATCH 1/3] block: consistently use bdrv_is_read_only() Vladimir Sementsov-Ogievskiy
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-05-26 21:15 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, codyprime, armbru, fam, stefanha, vsementsov, jsnow,
	mreitz, kwolf

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-27 15:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 21:15 [PATCH 0/3] block: drop BlockDriverState::read_only Vladimir Sementsov-Ogievskiy
2021-05-26 21:15 ` [PATCH 1/3] block: consistently use bdrv_is_read_only() Vladimir Sementsov-Ogievskiy
2021-05-27 14:48   ` Kevin Wolf
2021-05-26 21:15 ` [PATCH 2/3] block: drop BlockDriverState::read_only Vladimir Sementsov-Ogievskiy
2021-05-26 21:15 ` [PATCH 3/3] block: drop BlockBackendRootState::read_only Vladimir Sementsov-Ogievskiy
2021-05-27 14:46   ` Kevin Wolf
2021-05-27 15:31     ` Vladimir Sementsov-Ogievskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).