diff mbox

[07/19] qcow2: Implement bdrv_refresh_filename()

Message ID 1461706338-20219-8-git-send-email-mreitz@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Max Reitz April 26, 2016, 9:32 p.m. UTC
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 <mreitz@redhat.com>
---
 block/qcow2.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox

Patch

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,