diff options
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 6cd2c313e800..10c5844460cb 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -26,10 +26,10 @@ | |||
26 | /* | 26 | /* |
27 | * find which device holds a particular offset | 27 | * find which device holds a particular offset |
28 | */ | 28 | */ |
29 | static inline dev_info_t *which_dev(mddev_t *mddev, sector_t sector) | 29 | static inline struct dev_info *which_dev(struct mddev *mddev, sector_t sector) |
30 | { | 30 | { |
31 | int lo, mid, hi; | 31 | int lo, mid, hi; |
32 | linear_conf_t *conf; | 32 | struct linear_conf *conf; |
33 | 33 | ||
34 | lo = 0; | 34 | lo = 0; |
35 | hi = mddev->raid_disks - 1; | 35 | hi = mddev->raid_disks - 1; |
@@ -63,8 +63,8 @@ static int linear_mergeable_bvec(struct request_queue *q, | |||
63 | struct bvec_merge_data *bvm, | 63 | struct bvec_merge_data *bvm, |
64 | struct bio_vec *biovec) | 64 | struct bio_vec *biovec) |
65 | { | 65 | { |
66 | mddev_t *mddev = q->queuedata; | 66 | struct mddev *mddev = q->queuedata; |
67 | dev_info_t *dev0; | 67 | struct dev_info *dev0; |
68 | unsigned long maxsectors, bio_sectors = bvm->bi_size >> 9; | 68 | unsigned long maxsectors, bio_sectors = bvm->bi_size >> 9; |
69 | sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); | 69 | sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); |
70 | 70 | ||
@@ -89,8 +89,8 @@ static int linear_mergeable_bvec(struct request_queue *q, | |||
89 | 89 | ||
90 | static int linear_congested(void *data, int bits) | 90 | static int linear_congested(void *data, int bits) |
91 | { | 91 | { |
92 | mddev_t *mddev = data; | 92 | struct mddev *mddev = data; |
93 | linear_conf_t *conf; | 93 | struct linear_conf *conf; |
94 | int i, ret = 0; | 94 | int i, ret = 0; |
95 | 95 | ||
96 | if (mddev_congested(mddev, bits)) | 96 | if (mddev_congested(mddev, bits)) |
@@ -108,9 +108,9 @@ static int linear_congested(void *data, int bits) | |||
108 | return ret; | 108 | return ret; |
109 | } | 109 | } |
110 | 110 | ||
111 | static sector_t linear_size(mddev_t *mddev, sector_t sectors, int raid_disks) | 111 | static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disks) |
112 | { | 112 | { |
113 | linear_conf_t *conf; | 113 | struct linear_conf *conf; |
114 | sector_t array_sectors; | 114 | sector_t array_sectors; |
115 | 115 | ||
116 | rcu_read_lock(); | 116 | rcu_read_lock(); |
@@ -123,13 +123,13 @@ static sector_t linear_size(mddev_t *mddev, sector_t sectors, int raid_disks) | |||
123 | return array_sectors; | 123 | return array_sectors; |
124 | } | 124 | } |
125 | 125 | ||
126 | static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) | 126 | static struct linear_conf *linear_conf(struct mddev *mddev, int raid_disks) |
127 | { | 127 | { |
128 | linear_conf_t *conf; | 128 | struct linear_conf *conf; |
129 | mdk_rdev_t *rdev; | 129 | struct md_rdev *rdev; |
130 | int i, cnt; | 130 | int i, cnt; |
131 | 131 | ||
132 | conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(dev_info_t), | 132 | conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(struct dev_info), |
133 | GFP_KERNEL); | 133 | GFP_KERNEL); |
134 | if (!conf) | 134 | if (!conf) |
135 | return NULL; | 135 | return NULL; |
@@ -139,7 +139,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) | |||
139 | 139 | ||
140 | list_for_each_entry(rdev, &mddev->disks, same_set) { | 140 | list_for_each_entry(rdev, &mddev->disks, same_set) { |
141 | int j = rdev->raid_disk; | 141 | int j = rdev->raid_disk; |
142 | dev_info_t *disk = conf->disks + j; | 142 | struct dev_info *disk = conf->disks + j; |
143 | sector_t sectors; | 143 | sector_t sectors; |
144 | 144 | ||
145 | if (j < 0 || j >= raid_disks || disk->rdev) { | 145 | if (j < 0 || j >= raid_disks || disk->rdev) { |
@@ -194,9 +194,9 @@ out: | |||
194 | return NULL; | 194 | return NULL; |
195 | } | 195 | } |
196 | 196 | ||
197 | static int linear_run (mddev_t *mddev) | 197 | static int linear_run (struct mddev *mddev) |
198 | { | 198 | { |
199 | linear_conf_t *conf; | 199 | struct linear_conf *conf; |
200 | 200 | ||
201 | if (md_check_no_bitmap(mddev)) | 201 | if (md_check_no_bitmap(mddev)) |
202 | return -EINVAL; | 202 | return -EINVAL; |
@@ -213,7 +213,7 @@ static int linear_run (mddev_t *mddev) | |||
213 | return md_integrity_register(mddev); | 213 | return md_integrity_register(mddev); |
214 | } | 214 | } |
215 | 215 | ||
216 | static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) | 216 | static int linear_add(struct mddev *mddev, struct md_rdev *rdev) |
217 | { | 217 | { |
218 | /* Adding a drive to a linear array allows the array to grow. | 218 | /* Adding a drive to a linear array allows the array to grow. |
219 | * It is permitted if the new drive has a matching superblock | 219 | * It is permitted if the new drive has a matching superblock |
@@ -223,7 +223,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) | |||
223 | * The current one is never freed until the array is stopped. | 223 | * The current one is never freed until the array is stopped. |
224 | * This avoids races. | 224 | * This avoids races. |
225 | */ | 225 | */ |
226 | linear_conf_t *newconf, *oldconf; | 226 | struct linear_conf *newconf, *oldconf; |
227 | 227 | ||
228 | if (rdev->saved_raid_disk != mddev->raid_disks) | 228 | if (rdev->saved_raid_disk != mddev->raid_disks) |
229 | return -EINVAL; | 229 | return -EINVAL; |
@@ -245,9 +245,9 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) | |||
245 | return 0; | 245 | return 0; |
246 | } | 246 | } |
247 | 247 | ||
248 | static int linear_stop (mddev_t *mddev) | 248 | static int linear_stop (struct mddev *mddev) |
249 | { | 249 | { |
250 | linear_conf_t *conf = mddev->private; | 250 | struct linear_conf *conf = mddev->private; |
251 | 251 | ||
252 | /* | 252 | /* |
253 | * We do not require rcu protection here since | 253 | * We do not require rcu protection here since |
@@ -264,9 +264,9 @@ static int linear_stop (mddev_t *mddev) | |||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
267 | static int linear_make_request (mddev_t *mddev, struct bio *bio) | 267 | static int linear_make_request (struct mddev *mddev, struct bio *bio) |
268 | { | 268 | { |
269 | dev_info_t *tmp_dev; | 269 | struct dev_info *tmp_dev; |
270 | sector_t start_sector; | 270 | sector_t start_sector; |
271 | 271 | ||
272 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { | 272 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { |
@@ -323,14 +323,14 @@ static int linear_make_request (mddev_t *mddev, struct bio *bio) | |||
323 | return 1; | 323 | return 1; |
324 | } | 324 | } |
325 | 325 | ||
326 | static void linear_status (struct seq_file *seq, mddev_t *mddev) | 326 | static void linear_status (struct seq_file *seq, struct mddev *mddev) |
327 | { | 327 | { |
328 | 328 | ||
329 | seq_printf(seq, " %dk rounding", mddev->chunk_sectors / 2); | 329 | seq_printf(seq, " %dk rounding", mddev->chunk_sectors / 2); |
330 | } | 330 | } |
331 | 331 | ||
332 | 332 | ||
333 | static struct mdk_personality linear_personality = | 333 | static struct md_personality linear_personality = |
334 | { | 334 | { |
335 | .name = "linear", | 335 | .name = "linear", |
336 | .level = LEVEL_LINEAR, | 336 | .level = LEVEL_LINEAR, |