aboutsummaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 06:47:17 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:04 -0400
commit310a2c1012934f590192377f65940cad4aa72b15 (patch)
treeed30346abf07c5a7e94719f567368d5642af1f95 /block/genhd.c
parent88e341261ca4d39eec21b212961c77eff51105f7 (diff)
block: misc updates
This patch makes the following misc updates in preparation for disk->part dereference fix and extended block devt support. * implment part_to_disk() * fix comment about gendisk->part indexing * rename get_part() to disk_map_sector() * don't use n which is always zero while printing disk information in diskstats_show() Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 8b9a9ff1a842..11038fbc75ed 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -568,7 +568,7 @@ static int diskstats_show(struct seq_file *s, void *v)
568{ 568{
569 struct gendisk *gp = v; 569 struct gendisk *gp = v;
570 char buf[BDEVNAME_SIZE]; 570 char buf[BDEVNAME_SIZE];
571 int n = 0; 571 int n;
572 572
573 /* 573 /*
574 if (&gp->dev.kobj.entry == block_class.devices.next) 574 if (&gp->dev.kobj.entry == block_class.devices.next)
@@ -582,7 +582,7 @@ static int diskstats_show(struct seq_file *s, void *v)
582 disk_round_stats(gp); 582 disk_round_stats(gp);
583 preempt_enable(); 583 preempt_enable();
584 seq_printf(s, "%4d %4d %s %lu %lu %llu %u %lu %lu %llu %u %u %u %u\n", 584 seq_printf(s, "%4d %4d %s %lu %lu %llu %u %lu %lu %llu %u %u %u %u\n",
585 gp->major, n + gp->first_minor, disk_name(gp, n, buf), 585 gp->major, gp->first_minor, disk_name(gp, 0, buf),
586 disk_stat_read(gp, ios[0]), disk_stat_read(gp, merges[0]), 586 disk_stat_read(gp, ios[0]), disk_stat_read(gp, merges[0]),
587 (unsigned long long)disk_stat_read(gp, sectors[0]), 587 (unsigned long long)disk_stat_read(gp, sectors[0]),
588 jiffies_to_msecs(disk_stat_read(gp, ticks[0])), 588 jiffies_to_msecs(disk_stat_read(gp, ticks[0])),