qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] Add "read-only" to the options QDict
@ 2016-09-14 15:52 Alberto Garcia
  2016-09-14 15:52 ` [Qemu-devel] [PATCH 1/7] block: Remove bdrv_is_snapshot Alberto Garcia
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Alberto Garcia @ 2016-09-14 15:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, Kevin Wolf, Max Reitz, Alberto Garcia

This series adds "read-only" to the options QDict, fixing a
long-standing problem with the reopening code.

   [E] <- [D] <- [C] <- [B] <- [A]

In a normal scenario, the active layer [A] is in read-write mode and
everything else is read-only. If we reopen [D] in read-write mode and
later reopen [B], then [D] will become read-only when inheriting the
flags from its parent (see bdrv_backing_options()). With this series,
inheriting options doesn't need to override values that have been
explicitly set before.

The BDRV_O_RDWR flag is not removed yet, but its keep in sync with the
value of the "read-only" option. Removing the BDRV_O_RDWR flag is not
straightforward in all cases and can result in code that is
significantly slower and less readable. Therefore it will be dealt
with in the future.

Regards,

Berto

Alberto Garcia (7):
  block: Remove bdrv_is_snapshot
  block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the
    flags
  block: Update bs->open_flags earlier in bdrv_open_common()
  block: Add "read-only" to the options QDict
  block: Don't queue the same BDS twice in bdrv_reopen_queue_child()
  commit: Add 'base' to the reopen queue before 'overlay_bs'
  block: rename "read-only" to BDRV_OPT_READ_ONLY

 block.c               | 86 +++++++++++++++++++++++++++++++++++++--------------
 block/commit.c        |  8 ++---
 block/vvfat.c         |  3 +-
 blockdev.c            | 28 ++++++++++-------
 include/block/block.h |  2 +-
 5 files changed, 86 insertions(+), 41 deletions(-)

-- 
2.9.3

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

end of thread, other threads:[~2016-09-15 13:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14 15:52 [Qemu-devel] [PATCH 0/7] Add "read-only" to the options QDict Alberto Garcia
2016-09-14 15:52 ` [Qemu-devel] [PATCH 1/7] block: Remove bdrv_is_snapshot Alberto Garcia
2016-09-14 16:43   ` Kevin Wolf
2016-09-14 17:07   ` Eric Blake
2016-09-14 15:52 ` [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags Alberto Garcia
2016-09-14 16:40   ` Kevin Wolf
2016-09-15 11:24     ` Alberto Garcia
2016-09-15 12:19       ` Kevin Wolf
2016-09-15 12:31         ` Alberto Garcia
2016-09-15 12:50           ` Kevin Wolf
2016-09-15 12:55             ` Alberto Garcia
2016-09-14 18:54   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2016-09-15  9:10     ` Alberto Garcia
2016-09-14 15:52 ` [Qemu-devel] [PATCH 3/7] block: Update bs->open_flags earlier in bdrv_open_common() Alberto Garcia
2016-09-14 16:42   ` Kevin Wolf
2016-09-14 15:52 ` [Qemu-devel] [PATCH 4/7] block: Add "read-only" to the options QDict Alberto Garcia
2016-09-15 10:51   ` Kevin Wolf
2016-09-15 11:42     ` Alberto Garcia
2016-09-14 15:52 ` [Qemu-devel] [PATCH 5/7] block: Don't queue the same BDS twice in bdrv_reopen_queue_child() Alberto Garcia
2016-09-15 13:04   ` Kevin Wolf
2016-09-14 15:52 ` [Qemu-devel] [PATCH 6/7] commit: Add 'base' to the reopen queue before 'overlay_bs' Alberto Garcia
2016-09-15 13:06   ` Kevin Wolf
2016-09-14 15:52 ` [Qemu-devel] [PATCH 7/7] block: rename "read-only" to BDRV_OPT_READ_ONLY Alberto Garcia
2016-09-15 13:09   ` Kevin Wolf

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).