qemu-devel
[Top][All Lists]
Advanced

[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: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH V7 02/14] block: add bdrv_can_read_snapshot() function
Date: Fri, 01 Mar 2013 09:39:58 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130215 Thunderbird/17.0.3

于 2013-2-28 23:20, Stefan Hajnoczi 写道:
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


OK.

--
Best Regards

Wenchao Xia




reply via email to

[Prev in Thread] Current Thread [Next in Thread]