Xen. How an error message should not look like

From: Ulrich Windl
Date: Mon Feb 23 2015 - 02:45:43 EST


This is a somewhat generic subject, so please forgive me. We are having some very strange Xen problem in SLES11 SP3 (kernel 3.0.101-0.46-xen).
Eventually I found out that the message
kernel: [615432.648108] vbd vbd-7-51888: 2 creating vbd structure
is not a "progress" message (some vbd structure was created), but an error message (the vbd structure was NOT created because of error "2").

So first the user has to recognize that the text actually is an error, then the user has to find out what "2" means. Interestingly the most important information is missing (block major an minor number of the device for vbd_create()). When I did a little digging in the code I found this pearl of code (/usr/src/linux/drivers/xen/blkback/xenbus.c):

switch (err) {
if (!(be->blkif->vbd.type & (VDISK_CDROM | VDISK_REMOVABLE))) {
xenbus_dev_fatal(dev, err, "creating vbd structure");
/* fall through */
case 0:
err = xenvbd_sysfs_addif(dev);
if (err) {
xenbus_dev_fatal(dev, err, "creating sysfs entries");

Itself vbd_create() does not log a message, and neither does blkdev_get_by_dev() where the error comes from.

P.S. Not subscribed to LKML, so please keep me on CC: to address me

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/