diff options
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r-- | include/linux/genhd.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 297df45ffd0a..5f2f4c4d8fb0 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -91,6 +91,7 @@ struct hd_struct { | |||
91 | sector_t start_sect; | 91 | sector_t start_sect; |
92 | sector_t nr_sects; | 92 | sector_t nr_sects; |
93 | sector_t alignment_offset; | 93 | sector_t alignment_offset; |
94 | unsigned int discard_alignment; | ||
94 | struct device __dev; | 95 | struct device __dev; |
95 | struct kobject *holder_dir; | 96 | struct kobject *holder_dir; |
96 | int policy, partno; | 97 | int policy, partno; |
@@ -100,7 +101,7 @@ struct hd_struct { | |||
100 | unsigned long stamp; | 101 | unsigned long stamp; |
101 | int in_flight[2]; | 102 | int in_flight[2]; |
102 | #ifdef CONFIG_SMP | 103 | #ifdef CONFIG_SMP |
103 | struct disk_stats *dkstats; | 104 | struct disk_stats __percpu *dkstats; |
104 | #else | 105 | #else |
105 | struct disk_stats dkstats; | 106 | struct disk_stats dkstats; |
106 | #endif | 107 | #endif |
@@ -108,7 +109,7 @@ struct hd_struct { | |||
108 | }; | 109 | }; |
109 | 110 | ||
110 | #define GENHD_FL_REMOVABLE 1 | 111 | #define GENHD_FL_REMOVABLE 1 |
111 | #define GENHD_FL_DRIVERFS 2 | 112 | /* 2 is unused */ |
112 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 |
113 | #define GENHD_FL_CD 8 | 114 | #define GENHD_FL_CD 8 |
114 | #define GENHD_FL_UP 16 | 115 | #define GENHD_FL_UP 16 |
@@ -255,9 +256,9 @@ extern struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, | |||
255 | #define part_stat_read(part, field) \ | 256 | #define part_stat_read(part, field) \ |
256 | ({ \ | 257 | ({ \ |
257 | typeof((part)->dkstats->field) res = 0; \ | 258 | typeof((part)->dkstats->field) res = 0; \ |
258 | int i; \ | 259 | unsigned int _cpu; \ |
259 | for_each_possible_cpu(i) \ | 260 | for_each_possible_cpu(_cpu) \ |
260 | res += per_cpu_ptr((part)->dkstats, i)->field; \ | 261 | res += per_cpu_ptr((part)->dkstats, _cpu)->field; \ |
261 | res; \ | 262 | res; \ |
262 | }) | 263 | }) |
263 | 264 | ||