Implement this function by invoking bdrv_default_refresh_format_filename(bs, false). None of the qcow2 runtime options change the guest-visible state of a BDS.
Signed-off-by: Max Reitz <mre...@redhat.com> --- block/qcow2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 470734b..bcbf94e 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -3256,6 +3256,13 @@ void qcow2_signal_corruption(BlockDriverState *bs, bool fatal, int64_t offset, s->signaled_corruption = true; } +static void qcow2_refresh_filename(BlockDriverState *bs, QDict *opts) +{ + (void)opts; + + bdrv_default_refresh_format_filename(bs, false); +} + static QemuOptsList qcow2_create_opts = { .name = "qcow2-create-opts", .head = QTAILQ_HEAD_INITIALIZER(qcow2_create_opts.head), @@ -3346,6 +3353,7 @@ BlockDriver bdrv_qcow2 = { .bdrv_snapshot_load_tmp = qcow2_snapshot_load_tmp, .bdrv_get_info = qcow2_get_info, .bdrv_get_specific_info = qcow2_get_specific_info, + .bdrv_refresh_filename = qcow2_refresh_filename, .bdrv_save_vmstate = qcow2_save_vmstate, .bdrv_load_vmstate = qcow2_load_vmstate, -- 2.8.0