qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	pbonzini@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
	lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info
Date: Mon, 18 Mar 2013 17:48:30 +0100	[thread overview]
Message-ID: <20130318164830.GF2476@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <5146ECAB.1030109@linux.vnet.ibm.com>

Am 18.03.2013 um 11:30 hat Wenchao Xia geschrieben:
> 于 2013-3-15 16:07, Kevin Wolf 写道:
> >Am 15.03.2013 um 07:07 hat Wenchao Xia geschrieben:
> >>于 2013-3-13 20:40, Stefan Hajnoczi 写道:
> >>>The same applies for VMDK where one .vmdk can reference multiple extent
> >>>files.
> >>>
> >>   I'd like to confirm: This means a block device can have multiple
> >>images at top level, but one image can still have only one backing
> >>image at most? If my understanding is correct,following should be the
> >>case:
> >>
> >>1 device hda have two active images: a.qcow2 and b.qcow2(maybe vmdk
> >>format now, just an example)
> >>2 a.qcow2 file's backing file will be a_base0.qcow2, never a_base0.qcow2
> >>and a_base1.qcow2.
> >
> >I don't think this describes exactly what happens. Each qemu block
> >device refers to one BlockDriverState, let's say top.vmdk for the top
> >level image. This may refer to a backing file, backing.vmdk for example.
> >
> >Now top.vmdk nd back.vmdk could both be split images, and the former
> >refers to its extents top_0.vmdk and top_1.vmdk, which contain the
> >actual data of the image, and the latter may refer to backing_0.vmdk,
> >backing_1.vmdk and backing_2.vmdk.
> >
> >So this can happen in any position in the BlockDriverState graph.
> >
>   Thank u for the detailed explaination. Currently BlockDriverState
> have only one file name, so if my understanding is correct, the multiple
> referred disk is actually an internal data struct in VMDK now. Qemu main
> block layer only saw "main" disk in each layer.
> 
> an case:
> BlockDriverState:
>      |
> top.vmdk<-----------------------------------ref_top.vmdk
>      |                                            |
> backing_top.vmdk<---ref_backing_top.vmdk  backing_ref_top.vmdk
> 
>   This seems hard to be reflected in the structure I defined before,
> and hard to get in currently block.c's API. what I can think is
> improve ImageInfo:
> 
> { 'type': 'ImageInfo',
>    'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
>             '*actual-size': 'int', 'virtual-size': 'int',
>             '*cluster-size': 'int', '*encrypted': 'bool',
>             '*backing-filename': 'str', '*full-backing-filename': 'str',
>             '*backing-filename-format': 'str',
>             '*backing-image": 'ImageInfo',
>             '*ref-images": '[ImageInfo]',
>             '*snapshots': ['SnapshotInfo'] } }
> 
>   Backing-image reflect that one image can have one main backing file,
> and one image can have multiple referenced images. Do you think this
> structure is good enough?

Yes, I think this is fine.

We don't need to introduce ref-images now, it's just good to have the
option to do it as soon as we need it. This is why we preferred using a
recursive structure instead of an array.

Kevin

  reply	other threads:[~2013-03-18 16:53 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 11:23 [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 01/14] block: move bdrv_snapshot_find() to block/snapshot.c Wenchao Xia
2013-03-11 17:49   ` Eric Blake
2013-03-12  5:01     ` Wenchao Xia
2013-03-12 16:15       ` Eric Blake
2013-03-12 16:22         ` Eric Blake
2013-03-13  1:57           ` Wenchao Xia
2013-03-13 12:41       ` Kevin Wolf
2013-03-13 18:19         ` Markus Armbruster
2013-03-13 20:28           ` Eric Blake
2013-03-14  9:01           ` Kevin Wolf
2013-03-14 12:10             ` Markus Armbruster
2013-03-14 12:53               ` Kevin Wolf
2013-03-15  6:23                 ` Wenchao Xia
2013-03-15  8:00                   ` Kevin Wolf
2013-03-13 18:08     ` Markus Armbruster
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 02/14] block: distinguish id and name in bdrv_find_snapshot() Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 03/14] qemu-img: remove unused parameter in collect_image_info() Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 04/14] block: move collect_snapshots() and collect_image_info() to block/qapi.c Wenchao Xia
2013-03-12 19:41   ` Eric Blake
2013-03-13 20:34     ` Eric Blake
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 05/14] block: add snapshot info query function bdrv_query_snapshot_info_list() Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 06/14] block: add check for VM snapshot in bdrv_query_snapshot_info_list() Wenchao Xia
2013-03-12 19:45   ` Eric Blake
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 07/14] block: add image info query function bdrv_query_image_info() Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 08/14] qmp: add interface query-snapshots Wenchao Xia
2013-03-12 21:12   ` Eric Blake
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 09/14] qmp: add interface query-images Wenchao Xia
2013-03-12 21:24   ` Eric Blake
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 10/14] hmp: add function hmp_info_snapshots() Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 11/14] hmp: switch snapshot info function to qmp based one Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 12/14] block: move dump_human_image_info() to block/qapi.c Wenchao Xia
2013-03-13 20:38   ` Eric Blake
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 13/14] block: dump to buffer for bdrv_image_info_dump() Wenchao Xia
2013-03-11 11:23 ` [Qemu-devel] [PATCH V9 14/14] hmp: add command info images Wenchao Xia
2013-03-12 10:07 ` [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info Stefan Hajnoczi
2013-03-12 16:16   ` Eric Blake
2013-03-13  2:54     ` Wenchao Xia
2013-03-13 11:34       ` Stefan Hajnoczi
2013-03-13 12:29         ` Eric Blake
2013-03-13 12:35           ` Kevin Wolf
2013-03-13 12:40           ` Stefan Hajnoczi
2013-03-15  6:07             ` Wenchao Xia
2013-03-15  8:07               ` Kevin Wolf
2013-03-18 10:30                 ` Wenchao Xia
2013-03-18 16:48                   ` Kevin Wolf [this message]
2013-03-15  8:44               ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130318164830.GF2476@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).