From d34682cd4a06efe9ee3fc8cb7e8a0ea445299989 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Wed, 11 Dec 2013 19:26:16 +0100
Subject: block: Move initialisation of BlockLimits to bdrv_refresh_limits()

This function separates filling the BlockLimits from bdrv_open(), which
allows it to call it from other operations which may change the limits
(e.g. modifications to the backing file chain or bdrv_reopen)

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
---
 include/block/block_int.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'include')

diff --git a/include/block/block_int.h b/include/block/block_int.h
index 611a955712..f6fa1f6f36 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -232,6 +232,8 @@ struct BlockDriver {
     int (*bdrv_debug_resume)(BlockDriverState *bs, const char *tag);
     bool (*bdrv_debug_is_suspended)(BlockDriverState *bs, const char *tag);
 
+    int (*bdrv_refresh_limits)(BlockDriverState *bs);
+
     /*
      * Returns 1 if newly created images are guaranteed to contain only
      * zeros, 0 otherwise.
-- 
cgit v1.2.3