]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
qcow2: Add .bdrv_join_options callback
authorKevin Wolf <kwolf@redhat.com>
Mon, 16 Nov 2015 14:34:59 +0000 (15:34 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 18 Dec 2015 13:34:42 +0000 (14:34 +0100)
commit5365f44dfa4669a8d37ec309c421c7512959d509
tree5a4d53e8ed0ed63150062f09bd5d7c5113d18991
parent35cea22373fd8ec10575cb218304bea9b162447f
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>
block/qcow2.c
include/block/block_int.h