aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2019-03-12 18:48:48 +0200
committerKevin Wolf <kwolf@redhat.com>2019-03-12 20:30:14 +0100
commit8a2ce0bc1eb447c19c52422c03e690a420ea3ec7 (patch)
treeea4398dbcc4f7211347e4b0100de2030a680c10b /include/block
parentcb828c31de125d8c88ba1c3510b11343cbd211b3 (diff)
block: Add a 'mutable_opts' field to BlockDriver
If we reopen a BlockDriverState and there is an option that is present in bs->options but missing from the new set of options then we have to return an error unless the driver is able to reset it to its default value. This patch adds a new 'mutable_opts' field to BlockDriver. This is a list of runtime options that can be modified during reopen. If an option in this list is unspecified on reopen then it must be reset (or return an error). Signed-off-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 438feba4e5..01e855a066 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -383,6 +383,14 @@ struct BlockDriver {
/* List of options for creating images, terminated by name == NULL */
QemuOptsList *create_opts;
+ /*
+ * If this driver supports reopening images this contains a
+ * NULL-terminated list of the runtime options that can be
+ * modified. If an option in this list is unspecified during
+ * reopen then it _must_ be reset to its default value or return
+ * an error.
+ */
+ const char *const *mutable_opts;
/*
* Returns 0 for completed check, -errno for internal errors.