[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qed: add qed-tool.py image manipulation utility
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] qed: add qed-tool.py image manipulation utility |
Date: |
Fri, 02 Dec 2011 12:13:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 |
Am 02.12.2011 11:23, schrieb Stefan Hajnoczi:
> On Fri, Dec 2, 2011 at 9:15 AM, Kevin Wolf <address@hidden> wrote:
>> Am 01.12.2011 18:00, schrieb Stefan Hajnoczi:
>>> The qed-tool.py utility can inspect and manipulate QED image files. It
>>> can be used for testing to see the state of image metadata and also to
>>> inject corruptions into the image file. It also has a scrubbing feature
>>> to copy just the metadata out of an image file, allowing users to share
>>> broken image files without revealing data in bug reports.
>>>
>>> This has lived in my local repo for a long time but could be useful to
>>> others.
>>>
>>> Signed-off-by: Stefan Hajnoczi <address@hidden>
>>
>> For most of the commands, I think qemu-img/qemu-io should be extended
>> instead of creating scripts for one or two formats and lacking the
>> functionality for the rest.
>
> I have mixed feelings about that because I don't think a common
> interface will ever live up to its promise. We will have an interface
> that no two file formats implement much of (i.e. lots of NULL function
> pointers). The user experience will be that these commands don't work
> ("Operation not supported") and it's more flexible (and less code) to
> write a format-specific script like this.
>
> Also, usually before I use any of these potentially destructive
> commands I review the script's code to double-check exactly what the
> impact on the file will be. It's nice to have a concise Python script
> that can be reviewed easily rather than looking through layers of
> production C code.
>
> Do you really think there is much worth making common here?
Ok, I had another, closer look and there are two functions that I would
prefer to see in qemu-img info, namely fragmentation and dirty flag
status. For the rest you're probably right that an external script makes
more sense.
Kevin