diff options
author | Alberto Garcia | 2019-03-12 17:48:44 +0100 |
---|---|---|
committer | Kevin Wolf | 2019-03-12 20:30:14 +0100 |
commit | 077e8e2018bce66aa1d1a87fa42beb24992c490f (patch) | |
tree | 6d10ab50b5b37237fe4debb701deb83d974aa537 /include/block/block.h | |
parent | block: Freeze the backing chain for the duration of the stream job (diff) | |
download | qemu-077e8e2018bce66aa1d1a87fa42beb24992c490f.tar.gz qemu-077e8e2018bce66aa1d1a87fa42beb24992c490f.tar.xz qemu-077e8e2018bce66aa1d1a87fa42beb24992c490f.zip |
block: Add 'keep_old_opts' parameter to bdrv_reopen_queue()
The bdrv_reopen_queue() function is used to create a queue with
the BDSs that are going to be reopened and their new options. Once
the queue is ready bdrv_reopen_multiple() is called to perform the
operation.
The original options from each one of the BDSs are kept, with the new
options passed to bdrv_reopen_queue() applied on top of them.
For "x-blockdev-reopen" we want a function that behaves much like
"blockdev-add". We want to ignore the previous set of options so that
only the ones actually specified by the user are applied, with the
rest having their default values.
One of the things that we need is a way to tell bdrv_reopen_queue()
whether we want to keep the old set of options or not, and that's what
this patch does. All current callers are setting this new parameter to
true and x-blockdev-reopen will set it to false.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index b0c04f16c8..4b5ffffa1a 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -299,7 +299,8 @@ BlockDriverState *bdrv_open(const char *filename, const char *reference, BlockDriverState *bdrv_new_open_driver(BlockDriver *drv, const char *node_name, int flags, Error **errp); BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue, - BlockDriverState *bs, QDict *options); + BlockDriverState *bs, QDict *options, + bool keep_old_opts); int bdrv_reopen_multiple(AioContext *ctx, BlockReopenQueue *bs_queue, Error **errp); int bdrv_reopen_set_read_only(BlockDriverState *bs, bool read_only, Error **errp); |