[Top][All Lists]

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

Re: [Qemu-devel] [PATCH V4 2/9] snapshot: add paired functions for inter

From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH V4 2/9] snapshot: add paired functions for internal snapshot id and name
Date: Wed, 10 Jul 2013 16:49:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 10.07.2013 um 16:43 hat Wenchao Xia geschrieben:
> 于 2013-7-10 22:22, Kevin Wolf 写道:
> >Am 10.07.2013 um 15:54 hat Wenchao Xia geschrieben:
> >>于 2013-7-10 21:10, Kevin Wolf 写道:
> >>>Am 08.07.2013 um 10:00 hat Wenchao Xia geschrieben:
> >>>>Internal snapshot's ID and name concept are both visible in general
> >>>>block level, they are observed by user in "info snapshots", so it is
> >>>>possible to have conflict. Although we can separate the two concept in
> >>>>programming, but if they can be distinguished in string itself, things
> >>>>will be simple and clear, so introduce two functions to do it.
> >>>>
> >>>>The implemention, qcow2 snapshot calls snapshot_id_string_generate() to
> >>>>make sure it follows the rule in driver. If caller or user give a check
> >>>>with snapshot_name_wellformed() before create snapshot, then the ID
> >>>>and name will never conflict. The check can be also taken in
> >>>>qcow2_snapshot_create(), but require it to return error reason.
> >>>
> >>>I'm not sure how useful this is. While we can restrict what IDs we allow
> >>>for creating new snapshots, we cannot take any advantage from it because
> >>>existing snapshots could already be named with only digits (they could
> >>>also use a non-numeric ID). At the end of the day we're limiting the
> >>   Qcow2's ID seems always numeric, do you mean sheepdog may have
> >>non-numeric ID?
> >
> >That's not true, qcow2 has an ID string rather than a numeric ID.
> >
>   But there is no way to specify non-numeric ID in public interface,
> such as savevm, qemu-img, and in qcow2_snapshot_create(),
> find_new_snapshot_id() will always fill in a numeric ID string, so
> result is that, qcow2's snapshot ID string is always a numeric string.

Who said that qemu is the only program on the world that can create
qcow2 snapshots? It might be, I don't know of any other, but qcow2 is
defined by its spec, not by qemu's source code. And the spec talks about
an ID string (just like the qemu code does, even though it happens to
only write numbers into this string).


reply via email to

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