WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [xen-devel][PATCH 2/5] Xl interface change plus changes to code it i

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [xen-devel][PATCH 2/5] Xl interface change plus changes to code it impacts
From: Kamala Narasimhan <kamala.narasimhan@xxxxxxxxx>
Date: Tue, 08 Feb 2011 13:56:35 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 08 Feb 2011 10:57:15 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=jxzqEqwbGwSARq6Q4YTQXsssJFt2u5CyT68dk++OA1s=; b=Ucj0YfoVrpRiDKFeAuSXWhIyBWMwlieKZsMkK0PPezfog3Sta38O6n588TKIfrl1Yu nVrf0Kp6d/hcfvpTP0H+DrtIDxrMBWkAXLI5v+K0cV1UEDgDTxaKX42oZlB9FVHL5zMT ZW9/KfX71KQozCCGwOW5uU1vCymgdomt4tXhk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=vtS4XHaGxrSchmWNNs/2qB4HlYK2NpS/hbW5gS1k9dquBdxU39G4oGB9Z+UGEbHYuo HfIzv7/iI4LNs+ytknaWMke5+rbJm+Mg1LJ+vQn2Si+IhPqvisBifn7FJ05b42q+8RW6 3K9BGpwlvHlQ/wnZ6P5rinmq2wKZr7GGXVrZY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19793.25729.936107.227868@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D50628A.2000307@xxxxxxxxx> <19793.25729.936107.227868@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (X11/20101027)
Ian Jackson wrote:
> Kamala Narasimhan writes ("[xen-devel][PATCH 2/5] Xl interface change plus 
> changes to code it impacts"):
>> Attached are the changes made to xl disk related interface per earlier 
>> discussion.  Please let me know if there are further comments/issues to fix.
> 
> Thanks.  I have some comments of my own:
> 
>> +char *libxl__device_disk_string_of_backend(libxl_disk_backend backend)
> ...
>> +    switch (backend) {
>> +        case DISK_BACKEND_QEMU: return "qdisk";
>> +        case DISK_BACKEND_TAPDISK2: return "tap";
>> +        case DISK_BACKEND_BLKBACK: return "phy";
> 
> Perhaps the backend type number constants should be _QDISK, _TAP,
> _PHY ?  I think a function like _string_of should be a simple mapping
> to return the string version of the same name, not also change the
> name.
>
I can make that change.

>> -            if (libxl__blktap_enabled(&gc))
>> +            if ( libxl__blktap_enabled(&gc) && 
>> +                 disk->format != DISK_BACKEND_QEMU )
> 
> Don't add whitespace inside the if's ( ).  (You have done this in
> several places.  I know that libxl isn't entirely consistent but
> we have a defined coding style shouldn't be making the code less
> consistent.)
> 
Oh, boy!  I have consistently done that all over the patches as I assumed that
to be our convention.  Will change that too.

>> diff -r e4406b9fb064 tools/libxl/xl_cmdimpl.c
>> --- a/tools/libxl/xl_cmdimpl.c       Mon Feb 07 15:04:32 2011 +0000
>> +++ b/tools/libxl/xl_cmdimpl.c       Mon Feb 07 11:28:10 2011 -0500
>> @@ -361,9 +361,9 @@ static void printf_info(int domid,
>>          printf("\t\t(tap\n");
>>          printf("\t\t\t(backend_domid %d)\n", 
>> d_config->disks[i].backend_domid);
>>          printf("\t\t\t(domid %d)\n", d_config->disks[i].domid);
>> -        printf("\t\t\t(physpath %s)\n", d_config->disks[i].physpath);
>> -        printf("\t\t\t(phystype %d)\n", d_config->disks[i].phystype);
>> -        printf("\t\t\t(virtpath %s)\n", d_config->disks[i].virtpath);
>> +        printf("\t\t\t(pdev_path %s)\n", d_config->disks[i].pdev_path);
>> +        printf("\t\t\t(backend %d)\n", d_config->disks[i].backend);
>> +        printf("\t\t\t(vdev %s)\n", d_config->disks[i].vdev);
> 
> This part of the code is providing information which is intended to be
> parsed by callers which were written to cope with the output from xm.
> For backward compatibility, the previously used names and values
> should be output with the previously used semantics; it is OK to add
> new ones too with more sane semantics.
> 
> I think it's also acceptable to be a bit approximate with the
> emulation, but simply removing the old names is not correct.
> 
I didn't realize that.  Will keep the old display names then.

Kamala




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel