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] Add some additional error nodes when block device setup

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add some additional error nodes when block device setup fails.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Aug 2005 09:56:13 +0000
Delivery-date: Wed, 24 Aug 2005 09:08:56 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID ac57c81692b24685345603ea5892d89451b6ef31
# Parent  a3822cb3b2b3c24e6b46c1fed3e6c366817f52ad
Add some additional error nodes when block device setup fails.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r a3822cb3b2b3 -r ac57c81692b2 
linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Wed Aug 24 08:28:50 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Wed Aug 24 08:55:14 2005
@@ -75,7 +75,7 @@
        err = xenbus_gather(be->frontpath, "grant-id", "%lu", &sharedmfn,
                            "event-channel", "%u", &evtchn, NULL);
        if (err) {
-               xenbus_dev_error(be->dev, err, 
+               xenbus_dev_error(be->dev, err,
                                 "reading %s/grant-id and event-channel",
                                 be->frontpath);
                return;
@@ -177,6 +177,9 @@
                err = register_xenbus_watch(&be->watch);
                if (err) {
                        be->watch.node = NULL;
+                       xenbus_dev_error(dev, err,
+                                        "adding frontend watch on %s",
+                                        be->frontpath);
                        goto device_fail;
                }
        }
@@ -211,12 +214,15 @@
                if (IS_ERR(be->blkif)) {
                        err = PTR_ERR(be->blkif);
                        be->blkif = NULL;
+                       xenbus_dev_error(dev, err, "creating block interface");
                        goto device_fail;
                }
 
                err = vbd_create(be->blkif, handle, be->pdev, be->readonly);
-               if (err)
+               if (err) {
+                       xenbus_dev_error(dev, err, "creating vbd structure");
                        goto device_fail;
+               }
 
                frontend_changed(&be->watch, be->frontpath);
        }
@@ -238,8 +244,10 @@
        int err;
 
        be = kmalloc(sizeof(*be), GFP_KERNEL);
-       if (!be)
+       if (!be) {
+               xenbus_dev_error(dev, -ENOMEM, "allocating backend structure");
                return -ENOMEM;
+       }
 
        memset(be, 0, sizeof(*be));
 
@@ -247,8 +255,11 @@
        be->backend_watch.node = dev->nodename;
        be->backend_watch.callback = backend_changed;
        err = register_xenbus_watch(&be->backend_watch);
-       if (err)
+       if (err) {
+               xenbus_dev_error(dev, err, "adding backend watch on %s",
+                                dev->nodename);
                goto free_be;
+       }
 
        dev->data = be;
 
diff -r a3822cb3b2b3 -r ac57c81692b2 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Wed Aug 24 
08:28:50 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Wed Aug 24 
08:55:14 2005
@@ -1165,8 +1165,10 @@
 
        /* Create shared ring, alloc event channel. */
        err = setup_blkring(dev, info);
-       if (err)
+       if (err) {
+               xenbus_dev_error(dev, err, "setting up block ring");
                goto out;
+       }
 
        err = xenbus_transaction_start(dev->nodename);
        if (err) {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add some additional error nodes when block device setup fails., Xen patchbot -unstable <=