mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qcow2: Add .bdrv_join_options callback
qcow2 accepts a few driver-specific options that overlap semantically (e.g. "overlap-check" is an alias of "overlap-check.template", and any missing cache size option is derived from the given ones). When bdrv_reopen() merges the set of updated options with left out options that should be kept at their old value, we need to consider this and filter out any duplicates (which would generally cause errors because new and old value would contradict each other). This patch adds a .bdrv_join_options callback to BlockDriver and implements it for qcow2. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com>
This commit is contained in:
parent
35cea22373
commit
5365f44dfa
2 changed files with 48 additions and 0 deletions
|
@ -121,6 +121,7 @@ struct BlockDriver {
|
|||
BlockReopenQueue *queue, Error **errp);
|
||||
void (*bdrv_reopen_commit)(BDRVReopenState *reopen_state);
|
||||
void (*bdrv_reopen_abort)(BDRVReopenState *reopen_state);
|
||||
void (*bdrv_join_options)(QDict *options, QDict *old_options);
|
||||
|
||||
int (*bdrv_open)(BlockDriverState *bs, QDict *options, int flags,
|
||||
Error **errp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue