From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: phrdina@redhat.com, famz@redhat.com, armbru@redhat.com,
qemu-devel@nongnu.org, lcapitulino@redhat.com,
stefanha@redhat.com, pbonzini@redhat.com, dietmar@proxmox.com
Subject: Re: [Qemu-devel] [PATCH V4 2/9] snapshot: add paired functions for internal snapshot id and name
Date: Wed, 10 Jul 2013 21:54:42 +0800 [thread overview]
Message-ID: <51DD67A2.6090806@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130710131040.GO3898@dhcp-200-207.str.redhat.com>
于 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?
> choice of IDs that can be generated with the QMP command without a real
> reason.
>
This patch may limit the choice of snapshot name. Maybe we can't
benefit from it now because existing code, but shouldn't it be improved
in any new interface to alleviate the problem? I guess you idea
is drop this check in the new interface, isn't it?
> Kevin
>
--
Best Regards
Wenchao Xia
next prev parent reply other threads:[~2013-07-10 13:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 8:00 [Qemu-devel] [PATCH V4 0/9] add internal snapshot support at block device level Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 1/9] snapshot: new function bdrv_snapshot_find_by_id_and_name() Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 2/9] snapshot: add paired functions for internal snapshot id and name Wenchao Xia
2013-07-10 13:10 ` Kevin Wolf
2013-07-10 13:54 ` Wenchao Xia [this message]
2013-07-10 14:22 ` Kevin Wolf
2013-07-10 14:43 ` Wenchao Xia
2013-07-10 14:49 ` Kevin Wolf
2013-07-10 15:17 ` Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 3/9] snapshot: distinguish id and name in snapshot delete Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 4/9] qmp: add internal snapshot support in qmp_transaction Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 5/9] qmp: add interface blockdev-snapshot-internal-sync Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 6/9] qmp: add interface blockdev-snapshot-delete-internal-sync Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 7/9] hmp: add interface hmp_snapshot_blkdev_internal Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 8/9] hmp: add interface hmp_snapshot_delete_blkdev_internal Wenchao Xia
2013-07-08 8:00 ` [Qemu-devel] [PATCH V4 9/9] qemu-iotests: add 056 internal snapshot for block device test case Wenchao Xia
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=51DD67A2.6090806@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=armbru@redhat.com \
--cc=dietmar@proxmox.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@redhat.com \
--cc=phrdina@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).