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-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [BLKTAP] Ensure blktap doesn't try to re-create extant sysfs entries
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:14:33 -0700
Delivery-date: Mon, 04 Jun 2007 03:13:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [BLKTAP] Ensure blktap doesn't try to re-create extant sysfs entries, Xen patchbot-unstable <=