qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] Support default block interfaces per QEMUMa


From: Christian Borntraeger
Subject: Re: [Qemu-devel] [PATCH 1/1] Support default block interfaces per QEMUMachine
Date: Tue, 20 Nov 2012 12:22:59 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2

On 19/11/12 15:11, Markus Armbruster wrote:
> 
> Generalizing QEMUMachine member use_scsi to a default BlockInterfaceType
> makes plenty of sense to me.

Great.

> 
> I'm not sure "no initializer means IDE" is such a hot idea, but since
> it's how use_scsi has always worked, I'm okay with making its
> replacement work like that, too.

This actually makes sure that simple qemu command lines (without libvirt) 
provide
sane defaults for users, so I will try to keep that.

> 
> Like Alex, I dislike inventing yet another enumeration for this
> purpose.  Let's use BlockInterfaceType.

OK, will try to come up with something else.
> 
> In theory, we can change values of internal enumerations freely.  In
> practice, such changes can run afoul of leaky abstractions, such as C89
> array initializers and sloppy tests against zero.  Careful review
> advised.
> 

Indeed, I did it that way to avoid problems in code that implicitely assumes 
IF_NONE
if nothing is specified. Fortunately there are only a small number of code 
places
that actually check for IF_NONE (e.g. drive_hot_add).

I will try to review each place before re-submitting.

Christian




reply via email to

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