]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: Refresh filename after changing backing file
authorKevin Wolf <kwolf@redhat.com>
Thu, 9 Mar 2017 10:45:39 +0000 (11:45 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 13 Mar 2017 11:49:33 +0000 (12:49 +0100)
In bdrv_open_inherit(), the filename is refreshed after opening the
backing file, but we neglected to do the same when the backing file
changes later.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block.c

diff --git a/block.c b/block.c
index dd38e7139fa1d4393e2717d468203c9df9de2de7..cb5737073f57b25ed76a063ee2706c6e5e5a9911 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1938,6 +1938,8 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
         bdrv_unref(backing_hd);
     }
 
+    bdrv_refresh_filename(bs);
+
 out:
     bdrv_refresh_limits(bs, NULL);
 }