]> git.proxmox.com Git - mirror_qemu.git/commit
block: Add "read-only" to the options QDict
authorAlberto Garcia <berto@igalia.com>
Thu, 15 Sep 2016 14:53:02 +0000 (17:53 +0300)
committerKevin Wolf <kwolf@redhat.com>
Fri, 23 Sep 2016 11:36:10 +0000 (13:36 +0200)
commitf87a0e29a9814a7ab6ee92b238989fed6186c4f3
tree7c1ffdb94b7d3680c9d2117262b0bfecba174f05
parent9b7e8691670fab57c387b6955dc14a09696ae034
block: Add "read-only" to the options QDict

This adds the "read-only" option to the QDict. One important effect of
this change is that when a child inherits options from its parent, the
existing "read-only" mode can be preserved if it was explicitly set
previously.

This addresses scenarios like this:

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

In this case, if we reopen [D] with read-only=off, and later reopen
[B], then [D] will not inherit read-only=on from its parent during the
bdrv_reopen_queue_child() stage.

The BDRV_O_RDWR flag is not removed yet, but its keep in sync with the
value of the "read-only" option.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/vvfat.c
blockdev.c
include/block/block.h