qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] Add support for fd: protocol


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v2] Add support for fd: protocol
Date: Mon, 20 Jun 2011 14:11:08 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

On 06/20/2011 12:35 PM, Avi Kivity wrote:
On 06/20/2011 04:50 PM, Anthony Liguori wrote:
On 06/20/2011 08:40 AM, Avi Kivity wrote:
On 06/14/2011 04:31 PM, Corey Bryant wrote:
- Starting Qemu with a backing file


For this we could tell qemu that a file named "xyz" is available via fd
n, via an extension of the getfd command.

For example

(qemu) getfd path="/images/my-image.img"
(qemu) getfd path="/images/template.img"
(qemu) drive-add path="/images/my-image.img"

The open() for my-image.img first looks up the name in the getfd
database, and finds it, so it returns the fd from there instead of
opening. It then opens the backing file ("template.img") and looks it up
again, and finds the second fd from the session.

The way I've been thinking about this is:

-blockdev id=hd0-back,file=fd:4,format=raw \
-blockdev file=fd:3,format=qcow2,backing=hd0-back

While your proposal is clever, it makes me a little nervous about
subtle security ramifications.

It would need careful explanation in the management tool author's guide,
yes.

The main advantage is generality. It doesn't assume that a file format
has just one backing file, and doesn't require new syntax wherever a
file is referred to indirectly.

FWIW, with blockdev, we need options to control this all anyway. If you go back to my QCFG proposal, the parameters would actually be format specific, so if we had:

-block file=fd:4,format=fancypantsformat,part0=hd0-back.part1,part1=hd0-back.part2...

Regards,

Anthony Liguori






reply via email to

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