ia64/xen-unstable

changeset 2020:4fc62e2234f4

bitkeeper revision 1.1108.33.23 (410d0a8aWM5n48Ku4nUKCSOzCx9B2A)

sync with 2.4 block backend driver:
always print error messages
author cl349@freefall.cl.cam.ac.uk
date Sun Aug 01 15:21:46 2004 +0000 (2004-08-01)
parents ae1ea693453c
children 01ddb3c0f57e bfb45374e4b3
files linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c
line diff
     1.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h	Sun Aug 01 15:14:41 2004 +0000
     1.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h	Sun Aug 01 15:21:46 2004 +0000
     1.3 @@ -36,6 +36,9 @@
     1.4  #define DPRINTK(_f, _a...) ((void)0)
     1.5  #endif
     1.6  
     1.7 +#define PRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
     1.8 +                           __FILE__ , __LINE__ , ## _a )
     1.9 +
    1.10  typedef struct blkif_st {
    1.11      /* Unique identifier for this interface. */
    1.12      domid_t          domid;
     2.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c	Sun Aug 01 15:14:41 2004 +0000
     2.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c	Sun Aug 01 15:21:46 2004 +0000
     2.3 @@ -20,7 +20,7 @@ void vbd_create(blkif_be_vbd_create_t *c
     2.4      blkif = blkif_find_by_handle(create->domid, create->blkif_handle);
     2.5      if ( unlikely(blkif == NULL) )
     2.6      {
     2.7 -        DPRINTK("vbd_create attempted for non-existent blkif (%u,%u)\n", 
     2.8 +        PRINTK("vbd_create attempted for non-existent blkif (%u,%u)\n", 
     2.9                  create->domid, create->blkif_handle); 
    2.10          create->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
    2.11          return;
    2.12 @@ -43,7 +43,7 @@ void vbd_create(blkif_be_vbd_create_t *c
    2.13          }
    2.14          else
    2.15          {
    2.16 -            DPRINTK("vbd_create attempted for already existing vbd\n");
    2.17 +            PRINTK("vbd_create attempted for already existing vbd\n");
    2.18              create->status = BLKIF_BE_STATUS_VBD_EXISTS;
    2.19              goto out;
    2.20          }
    2.21 @@ -51,7 +51,7 @@ void vbd_create(blkif_be_vbd_create_t *c
    2.22  
    2.23      if ( unlikely((vbd = kmalloc(sizeof(vbd_t), GFP_KERNEL)) == NULL) )
    2.24      {
    2.25 -        DPRINTK("vbd_create: out of memory\n");
    2.26 +        PRINTK("vbd_create: out of memory\n");
    2.27          create->status = BLKIF_BE_STATUS_OUT_OF_MEMORY;
    2.28          goto out;
    2.29      }
    2.30 @@ -89,7 +89,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
    2.31      blkif = blkif_find_by_handle(grow->domid, grow->blkif_handle);
    2.32      if ( unlikely(blkif == NULL) )
    2.33      {
    2.34 -        DPRINTK("vbd_grow attempted for non-existent blkif (%u,%u)\n", 
    2.35 +        PRINTK("vbd_grow attempted for non-existent blkif (%u,%u)\n", 
    2.36                  grow->domid, grow->blkif_handle); 
    2.37          grow->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
    2.38          return;
    2.39 @@ -111,7 +111,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
    2.40  
    2.41      if ( unlikely(vbd == NULL) || unlikely(vbd->vdevice != vdevice) )
    2.42      {
    2.43 -        DPRINTK("vbd_grow: attempted to append extent to non-existent VBD.\n");
    2.44 +        PRINTK("vbd_grow: attempted to append extent to non-existent VBD.\n");
    2.45          grow->status = BLKIF_BE_STATUS_VBD_NOT_FOUND;
    2.46          goto out;
    2.47      } 
    2.48 @@ -119,7 +119,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
    2.49      if ( unlikely((x = kmalloc(sizeof(blkif_extent_le_t), 
    2.50                                 GFP_KERNEL)) == NULL) )
    2.51      {
    2.52 -        DPRINTK("vbd_grow: out of memory\n");
    2.53 +        PRINTK("vbd_grow: out of memory\n");
    2.54          grow->status = BLKIF_BE_STATUS_OUT_OF_MEMORY;
    2.55          goto out;
    2.56      }
    2.57 @@ -138,7 +138,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
    2.58  #if 0
    2.59      if( !blk_size[MAJOR(x->extent.device)] )
    2.60      {
    2.61 -        DPRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device);
    2.62 +        PRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device);
    2.63  	grow->status = BLKIF_BE_STATUS_EXTENT_NOT_FOUND;
    2.64  	goto out;
    2.65      }
    2.66 @@ -149,7 +149,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
    2.67  
    2.68      if ( x->extent.sector_start > 0 )
    2.69      {
    2.70 -        DPRINTK("vbd_grow: device %08x start not zero!\n", x->extent.device);
    2.71 +        PRINTK("vbd_grow: device %08x start not zero!\n", x->extent.device);
    2.72  	grow->status = BLKIF_BE_STATUS_EXTENT_NOT_FOUND;
    2.73  	goto out;
    2.74      }
    2.75 @@ -251,7 +251,7 @@ void vbd_destroy(blkif_be_vbd_destroy_t 
    2.76      blkif = blkif_find_by_handle(destroy->domid, destroy->blkif_handle);
    2.77      if ( unlikely(blkif == NULL) )
    2.78      {
    2.79 -        DPRINTK("vbd_destroy attempted for non-existent blkif (%u,%u)\n", 
    2.80 +        PRINTK("vbd_destroy attempted for non-existent blkif (%u,%u)\n", 
    2.81                  destroy->domid, destroy->blkif_handle); 
    2.82          destroy->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
    2.83          return;