[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V7 02/14] block: add bdrv_can_read_snapshot() fu
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH V7 02/14] block: add bdrv_can_read_snapshot() function |
Date: |
Thu, 28 Feb 2013 16:20:28 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Feb 26, 2013 at 06:40:16PM +0800, Wenchao Xia wrote:
> Compared to bdrv_can_snapshot(), this function return whether
> bs* is ready to read snapshot info from instead of write. If yes,
> caller can then query snapshot information, but taking snapshot
> is not always possible for that *bs may be read only.
>
> Signed-off-by: Wenchao Xia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> block.c | 19 +++++++++++++++++++
> include/block/block.h | 1 +
> 2 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/block.c b/block.c
> index 50dab8e..19c2d7b 100644
> --- a/block.c
> +++ b/block.c
> @@ -3058,6 +3058,25 @@ bool bdrv_debug_is_suspended(BlockDriverState *bs,
> const char *tag)
> /**************************************************************/
> /* handling of snapshots */
>
> +/* return whether internal snapshot can be read on @bs */
> +bool bdrv_can_read_snapshot(BlockDriverState *bs)
Which operations are included in "read a snapshot"?
Candidate list:
* bdrv_snapshot_load_tmp()
* bdrv_snapshot_list()
* bdrv_snapshot_dump()
* bdrv_load_vmstate()
* others?
Please document the meaning of this function so that others can
use/modify it correctly in the future.
Stefan
[Qemu-devel] [PATCH V7 03/14] block: return bool for bdrv_can_snapshot(), Wenchao Xia, 2013/02/26
[Qemu-devel] [PATCH V7 05/14] block: add snapshot info query function bdrv_query_snapshot_infolist(), Wenchao Xia, 2013/02/26