ia64/xen-unstable

changeset 196:a7df51f8cb0a

bitkeeper revision 1.57 (3e4fab53Dt9ecGJzSgdz46OGgXbMAQ)

ll_rw_blk.c:
Make block-device layer sanity checks noisy only in debug builds.
author kaf24@labyrinth.cl.cam.ac.uk
date Sun Feb 16 15:16:35 2003 +0000 (2003-02-16)
parents 7542fa654c67
children d35939d8ec52
files xen-2.4.16/drivers/block/ll_rw_blk.c
line diff
     1.1 --- a/xen-2.4.16/drivers/block/ll_rw_blk.c	Sun Feb 16 15:06:32 2003 +0000
     1.2 +++ b/xen-2.4.16/drivers/block/ll_rw_blk.c	Sun Feb 16 15:16:35 2003 +0000
     1.3 @@ -31,6 +31,15 @@
     1.4  #include <xeno/slab.h>
     1.5  #include <xeno/module.h>
     1.6  
     1.7 +/*
     1.8 + * KAF: We can turn off noise relating to barking guest-OS requests.
     1.9 + */
    1.10 +#if 0
    1.11 +#define DPRINTK(_f, _a...) printk(_f , ## _a)
    1.12 +#else
    1.13 +#define DPRINTK(_f, _a...) ((void)0)
    1.14 +#endif
    1.15 +
    1.16  /* XXX SMH: temporarily we just dive at xen_block completion handler */
    1.17  extern void end_block_io_op(struct buffer_head *bh); 
    1.18  
    1.19 @@ -314,12 +323,10 @@ static void generic_plug_device(request_
    1.20   */
    1.21  static inline void __generic_unplug_device(request_queue_t *q)
    1.22  {
    1.23 -  /*	printk(KERN_ALERT "__generic_unplug_device %p %d\n", q, q->plugged); */
    1.24  	if (q->plugged) {
    1.25  		q->plugged = 0;
    1.26  		if (!list_empty(&q->queue_head))
    1.27  		  {
    1.28 -		    /*		    printk(KERN_ALERT " calling %p\n", q->request_fn); */
    1.29  			q->request_fn(q);
    1.30  		  }
    1.31  	}
    1.32 @@ -330,8 +337,6 @@ void generic_unplug_device(void *data)
    1.33  	request_queue_t *q = (request_queue_t *) data;
    1.34  	unsigned long flags;
    1.35  
    1.36 -	/*	printk(KERN_ALERT "generic_unplug_device\n"); */
    1.37 -
    1.38  	spin_lock_irqsave(&io_request_lock, flags);
    1.39  	__generic_unplug_device(q);
    1.40  	spin_unlock_irqrestore(&io_request_lock, flags);
    1.41 @@ -869,8 +874,6 @@ static int __make_request(request_queue_
    1.42  	int latency;
    1.43  	elevator_t *elevator = &q->elevator;
    1.44  
    1.45 -	/* 	printk(KERN_ALERT "__make_request\n");*/
    1.46 -
    1.47  	count = bh->b_size >> 9;
    1.48  	sector = bh->b_rsector;
    1.49  
    1.50 @@ -1078,8 +1081,6 @@ void generic_make_request (int rw, struc
    1.51  	int minorsize = 0;
    1.52  	request_queue_t *q;
    1.53  
    1.54 -	/* 	printk(KERN_ALERT "generic_make_request\n"); */
    1.55 -
    1.56  	if (!bh->b_end_io)
    1.57  		BUG();
    1.58  
    1.59 @@ -1098,9 +1099,9 @@ void generic_make_request (int rw, struc
    1.60  			/* This may well happen - the kernel calls bread()
    1.61  			   without checking the size of the device, e.g.,
    1.62  			   when mounting a device. */
    1.63 -			printk(KERN_INFO
    1.64 +			DPRINTK(KERN_INFO
    1.65  			       "attempt to access beyond end of device\n");
    1.66 -			printk(KERN_INFO "%s: rw=%d, want=%ld, limit=%d\n",
    1.67 +			DPRINTK(KERN_INFO "%s: rw=%d, want=%ld, limit=%d\n",
    1.68  			       kdevname(bh->b_rdev), rw,
    1.69  			       (sector + count)>>1, minorsize);
    1.70  
    1.71 @@ -1123,7 +1124,7 @@ void generic_make_request (int rw, struc
    1.72  	do {
    1.73  		q = blk_get_queue(bh->b_rdev);
    1.74  		if (!q || !q->make_request_fn) {
    1.75 -			printk(KERN_ERR
    1.76 +			DPRINTK(KERN_ERR
    1.77  			       "generic_make_request: Trying to access "
    1.78  			       "nonexistent block-device %s (%ld)\n",
    1.79  			       kdevname(bh->b_rdev), bh->b_rsector);
    1.80 @@ -1202,8 +1203,6 @@ void ll_rw_block(int rw, int nr, struct 
    1.81  	int correct_size;
    1.82  	int i;
    1.83  
    1.84 -	/* 	printk(KERN_ALERT "ll_rw_block %d %d\n", rw, nr); */
    1.85 -
    1.86  	if (!nr)
    1.87  		return;
    1.88  
    1.89 @@ -1216,7 +1215,7 @@ void ll_rw_block(int rw, int nr, struct 
    1.90  	for (i = 0; i < nr; i++) {
    1.91  		struct buffer_head *bh = bhs[i];
    1.92  		if (bh->b_size % correct_size) {
    1.93 -			printk(KERN_NOTICE "ll_rw_block: device %s: "
    1.94 +			DPRINTK(KERN_NOTICE "ll_rw_block: device %s: "
    1.95  			       "only %d-char blocks implemented (%u)\n",
    1.96  			       kdevname(bhs[0]->b_dev),
    1.97  			       correct_size, bh->b_size);
    1.98 @@ -1225,7 +1224,7 @@ void ll_rw_block(int rw, int nr, struct 
    1.99  	}
   1.100  
   1.101  	if ((rw & WRITE) && is_read_only(bhs[0]->b_dev)) {
   1.102 -		printk(KERN_NOTICE "Can't write to read-only device %s\n",
   1.103 +		DPRINTK(KERN_NOTICE "Can't write to read-only device %s\n",
   1.104  		       kdevname(bhs[0]->b_dev));
   1.105  		goto sorry;
   1.106  	}
   1.107 @@ -1269,7 +1268,6 @@ void ll_rw_block(int rw, int nr, struct 
   1.108  	return;
   1.109  
   1.110  sorry:
   1.111 -	printk("~~~");
   1.112  	/* Make sure we don't get infinite dirty retries.. */
   1.113  	for (i = 0; i < nr; i++)
   1.114  		mark_buffer_clean(bhs[i]);