qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] Add nocreate option to snapshot_blkdev


From: Federico Simoncelli
Subject: Re: [Qemu-devel] [PATCH 3/3] Add nocreate option to snapshot_blkdev
Date: Thu, 23 Feb 2012 05:19:08 -0500 (EST)

----- Original Message -----
> From: "Paolo Bonzini" <address@hidden>
> To: "Federico Simoncelli" <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> Sent: Thursday, February 23, 2012 10:48:59 AM
> Subject: Re: [PATCH 3/3] Add nocreate option to snapshot_blkdev
> 
> On 02/23/2012 10:39 AM, Federico Simoncelli wrote:
> > I agree on the fact that using snapshot_blkdev is a misnomer but at
> > the same time I like very much how blkmirror is modular and it can
> > be used as a regular image filename.
> 
> True, on the other hand if we add this we will have to keep it
> forever.
> 
> I'm worried that blkmirror does not satisfy _all_ mirroring needs,
> for
> example you cannot use block_stream to copy from the source to the
> destination, so perhaps in the future we want to change it to
> something
> else.

Are you talking about a mirroring where you block_stream the missing
clusters in the destination from the source?
I believe that it could be done without losing the blkmirror
modularity probably extending the BlockDriver structure with some
additional concepts.

> So while I appreciate the easier debugging, I'm afraid that we'll
> regret
> adding a command-line-visible feature.
> 
> > I'm worried that making it explicit with a "--mirror" option would
> > take away its flexibility.
> > What about adding block_reopen and extending the blkmirror string:
> > 
> >  (qemu) block_reopen ide-hd0 \
> >  blkmirror:qcow2:/tmp/src/hd0snap1.qcow2:/tmp/dst/hd0snap1.qcow2
> > 
> > so that the format is passed as first argument (and if it's empty
> > we
> > would use the auto-detection).
> 
> No, the format of the source and destination should be independent.
>  It
> would be nice to have something like this:
> 
> blkmirror:src=...,dst=...,srcformat=...,dstformat=...
> 
> but commas are a pain because they need escaping.

I like that, one limitation we need to keep in mind is that it should
fit into the hard-coded filename limit of 1024 characters that (sadly) we
have in multiple places. Another thing is that at this stage the mirroring
is more an original/copy concept rather than source/destination.
What about:

blkmirror:...,copy=...,fmt=... (both images uses the same fmt)
blkmirror:...,copy=...,fmt=...,copyfmt=...

Or, eventually if you feel like that source/destination is more appropriate
for the future, then:

blkmirror:...,dst=...,fmt=...,dstfmt=...

-- 
Federico



reply via email to

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