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

[Xen-devel] [Xen-dev][PATCH] fix qcow2 can not work with blktap2

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Xen-dev][PATCH] fix qcow2 can not work with blktap2
From: "Zhang, Yang" <yang.zhang@xxxxxxxxx>
Date: Thu, 18 Jun 2009 11:34:24 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Dutch Meyer <dmeyer@xxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 17 Jun 2009 20:36:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnvxazCTK/OkdKbSOihTTKkJa9ssQ==
Thread-topic: [Xen-dev][PATCH] fix qcow2 can not work with blktap2
Since the hotplug script for udev has been removed by c/s 19349, we need report
the hotplug-status while the corresponding tapdisk been create. Or else, It will
raise an error "hotplug script not working".

Signed-off-by: Yang Zhang <yang.zhang@xxxxxxxxx>

diff -r 112680f620bf tools/blktap2/daemon/tapdisk-daemon.c
--- a/tools/blktap2/daemon/tapdisk-daemon.c     Mon Jun 08 18:23:57 2009 +0100
+++ b/tools/blktap2/daemon/tapdisk-daemon.c     Thu Jun 18 11:32:15 2009 +0800
@@ -295,7 +295,10 @@ tapdisk_daemon_probe(struct xs_handle *x
        len = strsep_len(path, '/', 7);
        if (len < 0)
                return;
-
+       if (path[len] == '\0') {
+               xs_printf(xsh, path, "hotplug-status", "connected");
+               return;
+       } 
        node = path + len + 1;
 
        if (!tapdisk_daemon_new_vbd_event(node))

Attachment: fix_qcow2_can_not_work_under_blktap2.patch
Description: fix_qcow2_can_not_work_under_blktap2.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>