From 9e7e940c3dc9d9643065dc0f64eb51efca954e54 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 9 Mar 2017 11:45:39 +0100 Subject: [PATCH] block: Refresh filename after changing backing file 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 Reviewed-by: Eric Blake --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index dd38e7139f..cb5737073f 100644 --- 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); }