aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-10-06 23:23:17 -0400
committerNeilBrown <neilb@suse.de>2011-10-06 23:23:17 -0400
commit36a4e1fe0f454146724c174bf7c1e8e76297a212 (patch)
tree57f0de83fda98e5ae1b4f66d5e993ca27386a793 /drivers/md/raid1.c
parentbdc04e6b15f70a8f96d8cdfe21df159a6466b49a (diff)
md: remove PRINTK and dprintk debugging and use pr_debug
Being able to dynamically enable these make them much more useful. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 77fab07abcee..c8993fb8286c 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -40,9 +40,6 @@
40#include "raid1.h" 40#include "raid1.h"
41#include "bitmap.h" 41#include "bitmap.h"
42 42
43#define DEBUG 0
44#define PRINTK(x...) do { if (DEBUG) printk(x); } while (0)
45
46/* 43/*
47 * Number of guaranteed r1bios in case of extreme VM load: 44 * Number of guaranteed r1bios in case of extreme VM load:
48 */ 45 */
@@ -246,11 +243,11 @@ static void raid_end_bio_io(r1bio_t *r1_bio)
246 243
247 /* if nobody has done the final endio yet, do it now */ 244 /* if nobody has done the final endio yet, do it now */
248 if (!test_and_set_bit(R1BIO_Returned, &r1_bio->state)) { 245 if (!test_and_set_bit(R1BIO_Returned, &r1_bio->state)) {
249 PRINTK(KERN_DEBUG "raid1: sync end %s on sectors %llu-%llu\n", 246 pr_debug("raid1: sync end %s on sectors %llu-%llu\n",
250 (bio_data_dir(bio) == WRITE) ? "write" : "read", 247 (bio_data_dir(bio) == WRITE) ? "write" : "read",
251 (unsigned long long) bio->bi_sector, 248 (unsigned long long) bio->bi_sector,
252 (unsigned long long) bio->bi_sector + 249 (unsigned long long) bio->bi_sector +
253 (bio->bi_size >> 9) - 1); 250 (bio->bi_size >> 9) - 1);
254 251
255 call_bio_endio(r1_bio); 252 call_bio_endio(r1_bio);
256 } 253 }
@@ -431,10 +428,11 @@ static void raid1_end_write_request(struct bio *bio, int error)
431 /* Maybe we can return now */ 428 /* Maybe we can return now */
432 if (!test_and_set_bit(R1BIO_Returned, &r1_bio->state)) { 429 if (!test_and_set_bit(R1BIO_Returned, &r1_bio->state)) {
433 struct bio *mbio = r1_bio->master_bio; 430 struct bio *mbio = r1_bio->master_bio;
434 PRINTK(KERN_DEBUG "raid1: behind end write sectors %llu-%llu\n", 431 pr_debug("raid1: behind end write sectors"
435 (unsigned long long) mbio->bi_sector, 432 " %llu-%llu\n",
436 (unsigned long long) mbio->bi_sector + 433 (unsigned long long) mbio->bi_sector,
437 (mbio->bi_size >> 9) - 1); 434 (unsigned long long) mbio->bi_sector +
435 (mbio->bi_size >> 9) - 1);
438 call_bio_endio(r1_bio); 436 call_bio_endio(r1_bio);
439 } 437 }
440 } 438 }
@@ -795,7 +793,7 @@ do_sync_io:
795 if (bvecs[i].bv_page) 793 if (bvecs[i].bv_page)
796 put_page(bvecs[i].bv_page); 794 put_page(bvecs[i].bv_page);
797 kfree(bvecs); 795 kfree(bvecs);
798 PRINTK("%dB behind alloc failed, doing sync I/O\n", bio->bi_size); 796 pr_debug("%dB behind alloc failed, doing sync I/O\n", bio->bi_size);
799} 797}
800 798
801static int make_request(mddev_t *mddev, struct bio * bio) 799static int make_request(mddev_t *mddev, struct bio * bio)