[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [BLKTAP] Ensure blktap doesn't try to re-create extant sysfs entries



# HG changeset patch
# User Jake Wires <jwires@xxxxxxxxxxxxx>
# Date 1179597241 25200
# Node ID 0fd2bf14f38ae8c9c325e289f906abcdb63fbca8
# Parent  1c232243a457b8972342dc8a0cd7bc7d31db5699
[BLKTAP] Ensure blktap doesn't try to re-create extant sysfs entries
Signed-off-by: Jake Wires <jwires@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -r 1c232243a457 -r 0fd2bf14f38a 
linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c  Fri May 18 17:01:20 
2007 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c  Sat May 19 10:54:01 
2007 -0700
@@ -161,7 +161,9 @@ int xentap_sysfs_addif(struct xenbus_dev
 
 void xentap_sysfs_delif(struct xenbus_device *dev)
 {
+       struct backend_info *be = dev->dev.driver_data;
        sysfs_remove_group(&dev->dev.kobj, &tapstat_group);
+       be->group_added = 0;
 }
 
 static int blktap_remove(struct xenbus_device *dev)
@@ -212,11 +214,13 @@ static void tap_update_blkif_status(blki
                return;
        }
 
-       err = xentap_sysfs_addif(blkif->be->dev);
-       if (err) {
-               xenbus_dev_fatal(blkif->be->dev, err, 
-                                "creating sysfs entries");
-               return;
+       if (!blkif->be->group_added) {
+               err = xentap_sysfs_addif(blkif->be->dev);
+               if (err) {
+                       xenbus_dev_fatal(blkif->be->dev, err, 
+                                        "creating sysfs entries");
+                       return;
+               }
        }
 
        blkif->xenblkd = kthread_run(tap_blkif_schedule, blkif, name);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.