[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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] qed: add qed-tool.py image manipulation utility
Date: Fri, 2 Dec 2011 10:23:18 +0000

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?


reply via email to

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