From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kamala Narasimhan Subject: Re: [PATCH] xl - Special case vhd images validation Date: Thu, 10 Feb 2011 14:55:34 -0500 Message-ID: <4D5442B6.2070900@gmail.com> References: <4D541D56.4090109@gmail.com> <19796.15622.618084.147420@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19796.15622.618084.147420@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org 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