|
From: | seeteena |
Subject: | Re: [Qemu-devel] [PATCH v1] hmp: 'info snapshots' not showing the id |
Date: | Thu, 4 Jan 2018 21:54:17 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 01/02/2018 01:54 PM, Markus Armbruster wrote:
seeteena <address@hidden> writes:On 12/22/2017 01:07 PM, Markus Armbruster wrote:Eric Blake <address@hidden> writes:On 12/19/2017 08:20 AM, Max Reitz wrote:So there are three things: (1) We probably should not allow snapshot names that could be IDs. Easiest way to solve this: Names have to start with a non-digit.Yes, that would be a nice change. It is not strictly backwards compatible (so we'd still have to cope with images that didn't follow the rule, whether created by older qemu or by non-qemu implementations of qcow2), but would alleviate a lot of confusion.I recommend to restrict ID strings to letters, digits, '-', '.', '_', starting with a letter. Use id_wellformed() to check.char *id_generate(IdSubSystems id) autogenates ID in the format eg- "#block146" with starting with '#' always. restricting ID strings to use id_wellformed() means we need to force ID to start with letter. #define ID_SPECIAL_CHAR '#' needs to change to (some letter) #define ID_SPECIAL_CHAR 'A'Ensuring auto-generated IDs cannot clash with IDs chosen by the user is a good idea. We generally fail to do that in QEMU. An obvious way to do it is to require the user's IDs to start with a letter, and auto-generated IDs to start with another suitable character. In theory, starting with '#' is problematic, because it needs to be quoted in shell at the beginning of words. Only matters if auto-generated IDs make sense in command lines, which I guess they currently don't. I'd prefer a 'shell-safe' character all the same.
I was using loaned system from other team for recreate and it appears there is some issue in that system and I am not able to recreate the issue now.
QEMU 2.11.50 monitor - type 'help' for more information (qemu) savevm 0 Error while creating snapshot on 'rootdisk' (qemu) savevm 0 Error while creating snapshot on 'rootdisk' (qemu) savevm 0 Error while creating snapshot on 'rootdisk' (qemu) savevm 1 Error while creating snapshot on 'rootdisk' (qemu)
If backward compatibility is an issue, deprecate offending IDs (with a suitable warning), and kill them off after the customary grace period. IDs embedded in image files and such you may have to keep working somehow indefinitely.
[Prev in Thread] | Current Thread | [Next in Thread] |