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