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] xl - Special case vhd images validation

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [xen-devel][PATCH] xl - Special case vhd images validation
From: Kamala Narasimhan <kamala.narasimhan@xxxxxxxxx>
Date: Thu, 10 Feb 2011 14:55:34 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 10 Feb 2011 11:56:22 -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=kyvcMU2Pg8fnTi/MeWbby7l9f/xBe3Jo/zCIxZf4Dk0=; b=aiDrdRjJW+JeC6PwEcfGfedssWix5IPBa6GY3ELktggtO3gXrE7Jwi8DFu3pUSDp/V iHrGr6KUMkySFoZEPmN9NzBO33su2vdBsBAfZ30gBn4Saoj/M29lrlByaJzXOKDjCElV LMRgX1Etp0rE5PbupYky8XtJ2/pPnR4Z8j2bI=
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=hztDpCKrRYQNJ0fzybfatvc1u4cEU+VudmXBb6cbCk0IUcij8aHXhrs6gpOO56RgA7 h/k4CJcMBRQmDO5G8vfStHyTouAhDWq5bu6AKW8FHUUPRBegOcVYDj9WGeNeBTJceSO3 2Trqk/NLy1cKQQa1k0KnqrtSDpTeHp6bSieeY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19796.15622.618084.147420@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: <4D541D56.4090109@xxxxxxxxx> <19796.15622.618084.147420@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (X11/20101027)
Ian Jackson wrote:
> Kamala Narasimhan writes ("[xen-devel][PATCH] xl - Special case vhd images 
> validation"):
>> Description - Special case how we validate vhd image files.  Without this 
>> patch when tap:aio:vhd prefixed image files are specified in the config 
>> file, disk validation and thus vm creation will fail.
> 
>> +    if (disk->format == DISK_FORMAT_RAW) {
>> +        delimiter = strchr(file_name, ':');
>> +        if (delimiter) { 
>> +            if (!strncmp(file_name, "vhd:", sizeof("vhd:")-1)) {
>> +                disk->format = DISK_FORMAT_VHD; 
>> +                file_name = ++delimiter;
>> +            }
>> +        }
>> +    }
> 
> This seems to suggest that if you say "tap:raw:" with a filename
> starting "vhd:" you get vhd instead.  This is a bit perverse but I
> guess acceptable for 4.1 at least.
>
We won't need this change if we have gone with patch 3 and further but since we
chose to move those post 4.1, we will need this.

> 
>>          LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "failed to stat %s", 
>> file_name);
>>          return ERROR_INVAL;
>>      }
>> -    if (backend_type == DISK_BACKEND_PHY) {
>> +    if (disk->backend == DISK_BACKEND_PHY) {
> 
> Is this change stray in this patch, or should it be included in one of
> the others ?  I'm not sure I follow it, anyway.
> 

I switched the input param for the method as I had to, so we need this as well.

Kamala


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