aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-11-07 18:21:41 +0100
committerKevin Wolf <kwolf@redhat.com>2017-11-17 13:35:59 +0100
commit398e6ad014df261d20d3fd6cff2cfbf940bac714 (patch)
tree32ab30963ddfd86a2e4bb9199c393c6a466e00f3 /qapi
parentf66afbe26f0c093d639610d70d16d7cc3183b652 (diff)
downloadqemu-398e6ad014df261d20d3fd6cff2cfbf940bac714.zip
qemu-398e6ad014df261d20d3fd6cff2cfbf940bac714.tar.gz
qemu-398e6ad014df261d20d3fd6cff2cfbf940bac714.tar.bz2
block: Deprecate bdrv_set_read_only() and users
bdrv_set_read_only() is used by some block drivers to override the read-only option given by the user. This is not how read-only images generally work in QEMU: Instead of second guessing what the user really meant (which currently includes making an image read-only even if the user didn't only use the default, but explicitly said read-only=off), we should error out if we can't provide what the user requested. This adds deprecation warnings to all callers of bdrv_set_read_only() so that the behaviour can be corrected after the usual deprecation period. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json7
1 files changed, 5 insertions, 2 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index ab96e34..76bf50f 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -3134,8 +3134,11 @@
# This option is required on the top level of blockdev-add.
# @discard: discard-related options (default: ignore)
# @cache: cache-related options
-# @read-only: whether the block device should be read-only
-# (default: false)
+# @read-only: whether the block device should be read-only (default: false).
+# Note that some block drivers support only read-only access,
+# either generally or in certain configurations. In this case,
+# the default value does not work and the option must be
+# specified explicitly.
# @detect-zeroes: detect and optimize zero writes (Since 2.1)
# (default: off)
# @force-share: force share all permission on added nodes.