aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:46:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:46:49 -0500
commit4fa639123d9e6e8dfaa3d116368f4b2478da31af (patch)
tree50c42e2102a542891a15b5011e48fbde14149baf /block
parentdf5b89b323b922f56650b4b4d7c41899b937cf19 (diff)
parentae36b883d29e53b6083ed3d1d44f254cee7507d3 (diff)
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] Don't make debugfs depend on DEBUG_KERNEL [PATCH] Fix blktrace compile with sysfs not defined [PATCH] unused label in drivers/block/cciss. [BLOCK] increase size of disk stat counters [PATCH] blk_execute_rq_nowait-speedup [PATCH] ide-cd: quiet down GPCMD_READ_CDVD_CAPACITY failure [BLOCK] ll_rw_blk: kmalloc -> kzalloc conversion [PATCH] kzalloc() conversion in drivers/block [PATCH] update max_sectors documentation
Diffstat (limited to 'block')
-rw-r--r--block/Kconfig1
-rw-r--r--block/genhd.c6
-rw-r--r--block/ll_rw_blk.c14
3 files changed, 11 insertions, 10 deletions
diff --git a/block/Kconfig b/block/Kconfig
index 43ca070dc0f8..5536839886ff 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -13,6 +13,7 @@ config LBD
13 13
14config BLK_DEV_IO_TRACE 14config BLK_DEV_IO_TRACE
15 bool "Support for tracing block io actions" 15 bool "Support for tracing block io actions"
16 depends on SYSFS
16 select RELAY 17 select RELAY
17 select DEBUG_FS 18 select DEBUG_FS
18 help 19 help
diff --git a/block/genhd.c b/block/genhd.c
index 64510fd88621..db4c60c802d6 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -454,8 +454,8 @@ static ssize_t disk_stats_read(struct gendisk * disk, char *page)
454 disk_round_stats(disk); 454 disk_round_stats(disk);
455 preempt_enable(); 455 preempt_enable();
456 return sprintf(page, 456 return sprintf(page,
457 "%8u %8u %8llu %8u " 457 "%8lu %8lu %8llu %8u "
458 "%8u %8u %8llu %8u " 458 "%8lu %8lu %8llu %8u "
459 "%8u %8u %8u" 459 "%8u %8u %8u"
460 "\n", 460 "\n",
461 disk_stat_read(disk, ios[READ]), 461 disk_stat_read(disk, ios[READ]),
@@ -649,7 +649,7 @@ static int diskstats_show(struct seq_file *s, void *v)
649 preempt_disable(); 649 preempt_disable();
650 disk_round_stats(gp); 650 disk_round_stats(gp);
651 preempt_enable(); 651 preempt_enable();
652 seq_printf(s, "%4d %4d %s %u %u %llu %u %u %u %llu %u %u %u %u\n", 652 seq_printf(s, "%4d %4d %s %lu %lu %llu %u %lu %lu %llu %u %u %u %u\n",
653 gp->major, n + gp->first_minor, disk_name(gp, n, buf), 653 gp->major, n + gp->first_minor, disk_name(gp, n, buf),
654 disk_stat_read(gp, ios[0]), disk_stat_read(gp, merges[0]), 654 disk_stat_read(gp, ios[0]), disk_stat_read(gp, merges[0]),
655 (unsigned long long)disk_stat_read(gp, sectors[0]), 655 (unsigned long long)disk_stat_read(gp, sectors[0]),
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index a2e333ad0b64..82469db25100 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -908,17 +908,15 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth)
908 __FUNCTION__, depth); 908 __FUNCTION__, depth);
909 } 909 }
910 910
911 tag_index = kmalloc(depth * sizeof(struct request *), GFP_ATOMIC); 911 tag_index = kzalloc(depth * sizeof(struct request *), GFP_ATOMIC);
912 if (!tag_index) 912 if (!tag_index)
913 goto fail; 913 goto fail;
914 914
915 nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG; 915 nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG;
916 tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); 916 tag_map = kzalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC);
917 if (!tag_map) 917 if (!tag_map)
918 goto fail; 918 goto fail;
919 919
920 memset(tag_index, 0, depth * sizeof(struct request *));
921 memset(tag_map, 0, nr_ulongs * sizeof(unsigned long));
922 tags->real_max_depth = depth; 920 tags->real_max_depth = depth;
923 tags->max_depth = depth; 921 tags->max_depth = depth;
924 tags->tag_index = tag_index; 922 tags->tag_index = tag_index;
@@ -2481,10 +2479,12 @@ void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk,
2481 rq->rq_disk = bd_disk; 2479 rq->rq_disk = bd_disk;
2482 rq->flags |= REQ_NOMERGE; 2480 rq->flags |= REQ_NOMERGE;
2483 rq->end_io = done; 2481 rq->end_io = done;
2484 elv_add_request(q, rq, where, 1); 2482 WARN_ON(irqs_disabled());
2485 generic_unplug_device(q); 2483 spin_lock_irq(q->queue_lock);
2484 __elv_add_request(q, rq, where, 1);
2485 __generic_unplug_device(q);
2486 spin_unlock_irq(q->queue_lock);
2486} 2487}
2487
2488EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); 2488EXPORT_SYMBOL_GPL(blk_execute_rq_nowait);
2489 2489
2490/** 2490/**