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] Stubdom and blktap

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Stubdom and blktap
From: "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>
Date: Wed, 08 Oct 2008 16:36:35 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 08 Oct 2008 01:38:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <48E0BC96.3080109@xxxxxxxxxxxxx>
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: <48DF3509.8010003@xxxxxxxxx> <48E0BC96.3080109@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

-----Original Message-----
From: Stefano Stabellini [mailto:stefano.stabellini@xxxxxxxxxxxxx]
Sent: Monday, September 29, 2008 7:32 PM
To: Yang, Xiaowei
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Stubdom and blktap

Yang, Xiaowei wrote:

Recently we had a try of stubdom, whose general status is good.

One issue we found is with aio/sync blktap as backend, disk performance
is obviously slower, and there are some IDE kernel error messages (like
irq timeout) at boot time.

I'll try to reproduce the problem, thanks for reporting it.

Another issue (not stubdom specific) comes from blktap's support for
QCOW image which is based on a backing file. We never tried this
configure before. The root cause is that in tdqcow_get_parent_id(), the
backing file is hard-coded to be QCOW type and tdqcow_validate_parent()
also presumes it, though the backing file is a raw image normally. With
the image type set correctly and a good method for image validation,
QCOW works.


I am not sure to understand what the issue is exactly: there is no image
format guessing using blktap, the user is supposed to specify correctly
the format in the VM configuration file.

Sorry for later response. I was on vacation.

Typically a QCOW image only presents changes made to a backing image. When a QCOW image is specified to be used in VM configuration file, blktap uses QCOW driver for it indeed. However, blktap also needs to access the backing file and before that it needs to choose a driver for it. As I said, the backing file is a raw one normally, and Qemu assumes it.

Here's a possibly simple (though with less flexibility) patch to it. Any comments are welcome!

diff -r f4552d9f6afb tools/blktap/drivers/block-qcow.c
--- a/tools/blktap/drivers/block-qcow.c Tue Sep 23 17:11:33 2008 +0100
+++ b/tools/blktap/drivers/block-qcow.c Wed Oct 08 05:45:29 2008 +0800
@@ -1385,7 +1385,7 @@ static int tdqcow_get_parent_id(struct d
        filename[len]  = '\0';

        id->name       = strdup(filename);
-       id->drivertype = DISK_TYPE_QCOW;
+       id->drivertype = DISK_TYPE_AIO;
        err            = 0;
  out:
        free(buf);
@@ -1397,17 +1397,15 @@ static int tdqcow_validate_parent(struct
 {
        struct stat stats;
        uint64_t psize, csize;
-       struct tdqcow_state *c = (struct tdqcow_state *)child->private;
-       struct tdqcow_state *p = (struct tdqcow_state *)parent->private;
-       
-       if (stat(p->name, &stats))
+       
+       if (stat(parent->name, &stats))
                return -EINVAL;
-       if (get_filesize(p->name, &psize, &stats))
+       if (get_filesize(parent->name, &psize, &stats))
                return -EINVAL;

-       if (stat(c->name, &stats))
+       if (stat(child->name, &stats))
                return -EINVAL;
-       if (get_filesize(c->name, &csize, &stats))
+       if (get_filesize(child->name, &csize, &stats))
                return -EINVAL;

        if (csize != psize)


Thanks,
Xiaowei

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

<Prev in Thread] Current Thread [Next in Thread>