aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h8
-rw-r--r--include/linux/genhd.h4
-rw-r--r--include/linux/part_stat.h17
3 files changed, 14 insertions, 15 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 619adea57098..1d4be1fc6007 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -191,7 +191,7 @@ struct request {
};
struct gendisk *rq_disk;
- struct hd_struct *part;
+ struct block_device *part;
#ifdef CONFIG_BLK_RQ_ALLOC_TIME
/* Time that the first bio started allocating this request. */
u64 alloc_time_ns;
@@ -1943,9 +1943,9 @@ unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
void disk_end_io_acct(struct gendisk *disk, unsigned int op,
unsigned long start_time);
-unsigned long part_start_io_acct(struct gendisk *disk, struct hd_struct **part,
- struct bio *bio);
-void part_end_io_acct(struct hd_struct *part, struct bio *bio,
+unsigned long part_start_io_acct(struct gendisk *disk,
+ struct block_device **part, struct bio *bio);
+void part_end_io_acct(struct block_device *part, struct bio *bio,
unsigned long start_time);
/**
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index df7319da013c..fe6fee77e2b9 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -131,8 +131,8 @@ enum {
struct disk_part_tbl {
struct rcu_head rcu_head;
int len;
- struct hd_struct __rcu *last_lookup;
- struct hd_struct __rcu *part[];
+ struct block_device __rcu *last_lookup;
+ struct block_device __rcu *part[];
};
struct disk_events;
diff --git a/include/linux/part_stat.h b/include/linux/part_stat.h
index 680de036691e..d2558121d48c 100644
--- a/include/linux/part_stat.h
+++ b/include/linux/part_stat.h
@@ -25,26 +25,26 @@ struct disk_stats {
#define part_stat_unlock() preempt_enable()
#define part_stat_get_cpu(part, field, cpu) \
- (per_cpu_ptr((part)->bdev->bd_stats, (cpu))->field)
+ (per_cpu_ptr((part)->bd_stats, (cpu))->field)
#define part_stat_get(part, field) \
part_stat_get_cpu(part, field, smp_processor_id())
#define part_stat_read(part, field) \
({ \
- typeof((part)->bdev->bd_stats->field) res = 0; \
+ typeof((part)->bd_stats->field) res = 0; \
unsigned int _cpu; \
for_each_possible_cpu(_cpu) \
- res += per_cpu_ptr((part)->bdev->bd_stats, _cpu)->field; \
+ res += per_cpu_ptr((part)->bd_stats, _cpu)->field; \
res; \
})
-static inline void part_stat_set_all(struct hd_struct *part, int value)
+static inline void part_stat_set_all(struct block_device *part, int value)
{
int i;
for_each_possible_cpu(i)
- memset(per_cpu_ptr(part->bdev->bd_stats, i), value,
+ memset(per_cpu_ptr(part->bd_stats, i), value,
sizeof(struct disk_stats));
}
@@ -54,13 +54,12 @@ static inline void part_stat_set_all(struct hd_struct *part, int value)
part_stat_read(part, field[STAT_DISCARD]))
#define __part_stat_add(part, field, addnd) \
- __this_cpu_add((part)->bdev->bd_stats->field, addnd)
+ __this_cpu_add((part)->bd_stats->field, addnd)
#define part_stat_add(part, field, addnd) do { \
__part_stat_add((part), field, addnd); \
- if ((part)->partno) \
- __part_stat_add(part_to_disk((part))->part0->bd_part, \
- field, addnd); \
+ if ((part)->bd_partno) \
+ __part_stat_add(bdev_whole(part), field, addnd); \
} while (0)
#define part_stat_dec(part, field) \