mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
88e341261c
commit
310a2c1012
5 changed files with 19 additions and 11 deletions
|
|
@ -757,7 +757,7 @@ diskstats(struct gendisk *disk, struct bio *bio, ulong duration, sector_t sector
|
|||
const int rw = bio_data_dir(bio);
|
||||
struct hd_struct *part;
|
||||
|
||||
part = get_part(disk, sector);
|
||||
part = disk_map_sector(disk, sector);
|
||||
all_stat_inc(disk, part, ios[rw], sector);
|
||||
all_stat_add(disk, part, ticks[rw], duration, sector);
|
||||
all_stat_add(disk, part, sectors[rw], n_sect, sector);
|
||||
|
|
|
|||
Loading…
Reference in a new issue