block: Update BlockLimits when they might have changed

When reopening with different flags, or when backing files disappear
from the chain, the limits may change. Make sure they get updated in
these cases.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Benoît Canet <benoit@irqsave.net>
This commit is contained in:
Kevin Wolf 2013-12-11 20:14:09 +01:00
parent 466ad822de
commit 355ef4ac95
3 changed files with 7 additions and 1 deletions

View file

@ -75,6 +75,8 @@ static void close_unused_images(BlockDriverState *top, BlockDriverState *base,
unused->backing_hd = NULL;
bdrv_unref(unused);
}
bdrv_refresh_limits(top);
}
static void coroutine_fn stream_run(void *opaque)