qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapsh


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info
Date: Fri, 15 Mar 2013 09:44:25 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Mar 15, 2013 at 02:07:01PM +0800, Wenchao Xia wrote:
> 于 2013-3-13 20:40, Stefan Hajnoczi 写道:
> >This is why I asked about the array.  A dict of ImageInfos is needed,
> >they can refer to each other by key.
> >
> >If we go with an array we're painting ourselves into a corner.
> >
> >If we go with a dict it's more complicated and may not be used much.
> >
> >I'd go for the dict but we need a policy for choosing keys (names) for
> >the ImageInfo elements.  Perhaps BlockDeviceInfo['file'] is the key for
> >the top-level image and then ImageInfo['backing-filename'] for the
> >backing chain.
> >
> >Stefan
> >
> 
>   Since ImageInfo already have key 'backing-filename', which stands for
> the information got in this image, not from the backing image,
> add a new key 'bakcing-image' for recursive linking:
> 
> { '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',
>            '*snapshots': ['SnapshotInfo'] } }
> 
>   Then insert ImageInfo into BlockDeviceInfo, with key 'images', since
> 'file' is already used which may break compatibility if we change it.
> 'images' uses an array for the case when multiple images exist in
> top level, not for backing chain.
> 
> { 'type': 'BlockDeviceInfo',
>   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
>             '*backing_file': 'str', 'backing_file_depth': 'int',
>             'encrypted': 'bool', 'encryption_key_missing': 'bool',
>             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
>             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
>             'images': ['ImageInfo']} }}

Sounds good.

Stefan



reply via email to

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