aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-10-11 01:49:02 -0400
committerNeilBrown <neilb@suse.de>2011-10-11 01:49:02 -0400
commite879a8793f915aa7933364d962d2435bd71de462 (patch)
treebf62ccd52171bdaebd1d09b98f049950e39dd198 /drivers/md
parente373ab109172abc2d821bd3b5c1b400acddef5a5 (diff)
md/raid10: typedef removal: conf_t -> struct r10conf
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid10.c108
-rw-r--r--drivers/md/raid10.h4
2 files changed, 55 insertions, 57 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 39661b19f409..f6a9b0c8f5fa 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -58,12 +58,12 @@
58 */ 58 */
59#define NR_RAID10_BIOS 256 59#define NR_RAID10_BIOS 256
60 60
61static void allow_barrier(conf_t *conf); 61static void allow_barrier(struct r10conf *conf);
62static void lower_barrier(conf_t *conf); 62static void lower_barrier(struct r10conf *conf);
63 63
64static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data) 64static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data)
65{ 65{
66 conf_t *conf = data; 66 struct r10conf *conf = data;
67 int size = offsetof(struct r10bio, devs[conf->copies]); 67 int size = offsetof(struct r10bio, devs[conf->copies]);
68 68
69 /* allocate a r10bio with room for raid_disks entries in the bios array */ 69 /* allocate a r10bio with room for raid_disks entries in the bios array */
@@ -92,7 +92,7 @@ static void r10bio_pool_free(void *r10_bio, void *data)
92 */ 92 */
93static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data) 93static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data)
94{ 94{
95 conf_t *conf = data; 95 struct r10conf *conf = data;
96 struct page *page; 96 struct page *page;
97 struct r10bio *r10_bio; 97 struct r10bio *r10_bio;
98 struct bio *bio; 98 struct bio *bio;
@@ -158,7 +158,7 @@ out_free_bio:
158static void r10buf_pool_free(void *__r10_bio, void *data) 158static void r10buf_pool_free(void *__r10_bio, void *data)
159{ 159{
160 int i; 160 int i;
161 conf_t *conf = data; 161 struct r10conf *conf = data;
162 struct r10bio *r10bio = __r10_bio; 162 struct r10bio *r10bio = __r10_bio;
163 int j; 163 int j;
164 164
@@ -175,7 +175,7 @@ static void r10buf_pool_free(void *__r10_bio, void *data)
175 r10bio_pool_free(r10bio, conf); 175 r10bio_pool_free(r10bio, conf);
176} 176}
177 177
178static void put_all_bios(conf_t *conf, struct r10bio *r10_bio) 178static void put_all_bios(struct r10conf *conf, struct r10bio *r10_bio)
179{ 179{
180 int i; 180 int i;
181 181
@@ -189,7 +189,7 @@ static void put_all_bios(conf_t *conf, struct r10bio *r10_bio)
189 189
190static void free_r10bio(struct r10bio *r10_bio) 190static void free_r10bio(struct r10bio *r10_bio)
191{ 191{
192 conf_t *conf = r10_bio->mddev->private; 192 struct r10conf *conf = r10_bio->mddev->private;
193 193
194 put_all_bios(conf, r10_bio); 194 put_all_bios(conf, r10_bio);
195 mempool_free(r10_bio, conf->r10bio_pool); 195 mempool_free(r10_bio, conf->r10bio_pool);
@@ -197,7 +197,7 @@ static void free_r10bio(struct r10bio *r10_bio)
197 197
198static void put_buf(struct r10bio *r10_bio) 198static void put_buf(struct r10bio *r10_bio)
199{ 199{
200 conf_t *conf = r10_bio->mddev->private; 200 struct r10conf *conf = r10_bio->mddev->private;
201 201
202 mempool_free(r10_bio, conf->r10buf_pool); 202 mempool_free(r10_bio, conf->r10buf_pool);
203 203
@@ -208,7 +208,7 @@ static void reschedule_retry(struct r10bio *r10_bio)
208{ 208{
209 unsigned long flags; 209 unsigned long flags;
210 struct mddev *mddev = r10_bio->mddev; 210 struct mddev *mddev = r10_bio->mddev;
211 conf_t *conf = mddev->private; 211 struct r10conf *conf = mddev->private;
212 212
213 spin_lock_irqsave(&conf->device_lock, flags); 213 spin_lock_irqsave(&conf->device_lock, flags);
214 list_add(&r10_bio->retry_list, &conf->retry_list); 214 list_add(&r10_bio->retry_list, &conf->retry_list);
@@ -230,7 +230,7 @@ static void raid_end_bio_io(struct r10bio *r10_bio)
230{ 230{
231 struct bio *bio = r10_bio->master_bio; 231 struct bio *bio = r10_bio->master_bio;
232 int done; 232 int done;
233 conf_t *conf = r10_bio->mddev->private; 233 struct r10conf *conf = r10_bio->mddev->private;
234 234
235 if (bio->bi_phys_segments) { 235 if (bio->bi_phys_segments) {
236 unsigned long flags; 236 unsigned long flags;
@@ -258,7 +258,7 @@ static void raid_end_bio_io(struct r10bio *r10_bio)
258 */ 258 */
259static inline void update_head_pos(int slot, struct r10bio *r10_bio) 259static inline void update_head_pos(int slot, struct r10bio *r10_bio)
260{ 260{
261 conf_t *conf = r10_bio->mddev->private; 261 struct r10conf *conf = r10_bio->mddev->private;
262 262
263 conf->mirrors[r10_bio->devs[slot].devnum].head_position = 263 conf->mirrors[r10_bio->devs[slot].devnum].head_position =
264 r10_bio->devs[slot].addr + (r10_bio->sectors); 264 r10_bio->devs[slot].addr + (r10_bio->sectors);
@@ -267,7 +267,7 @@ static inline void update_head_pos(int slot, struct r10bio *r10_bio)
267/* 267/*
268 * Find the disk number which triggered given bio 268 * Find the disk number which triggered given bio
269 */ 269 */
270static int find_bio_disk(conf_t *conf, struct r10bio *r10_bio, 270static int find_bio_disk(struct r10conf *conf, struct r10bio *r10_bio,
271 struct bio *bio, int *slotp) 271 struct bio *bio, int *slotp)
272{ 272{
273 int slot; 273 int slot;
@@ -289,7 +289,7 @@ static void raid10_end_read_request(struct bio *bio, int error)
289 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 289 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
290 struct r10bio *r10_bio = bio->bi_private; 290 struct r10bio *r10_bio = bio->bi_private;
291 int slot, dev; 291 int slot, dev;
292 conf_t *conf = r10_bio->mddev->private; 292 struct r10conf *conf = r10_bio->mddev->private;
293 293
294 294
295 slot = r10_bio->read_slot; 295 slot = r10_bio->read_slot;
@@ -358,7 +358,7 @@ static void raid10_end_write_request(struct bio *bio, int error)
358 struct r10bio *r10_bio = bio->bi_private; 358 struct r10bio *r10_bio = bio->bi_private;
359 int dev; 359 int dev;
360 int dec_rdev = 1; 360 int dec_rdev = 1;
361 conf_t *conf = r10_bio->mddev->private; 361 struct r10conf *conf = r10_bio->mddev->private;
362 int slot; 362 int slot;
363 363
364 dev = find_bio_disk(conf, r10_bio, bio, &slot); 364 dev = find_bio_disk(conf, r10_bio, bio, &slot);
@@ -433,7 +433,7 @@ static void raid10_end_write_request(struct bio *bio, int error)
433 * sector offset to a virtual address 433 * sector offset to a virtual address
434 */ 434 */
435 435
436static void raid10_find_phys(conf_t *conf, struct r10bio *r10bio) 436static void raid10_find_phys(struct r10conf *conf, struct r10bio *r10bio)
437{ 437{
438 int n,f; 438 int n,f;
439 sector_t sector; 439 sector_t sector;
@@ -481,7 +481,7 @@ static void raid10_find_phys(conf_t *conf, struct r10bio *r10bio)
481 BUG_ON(slot != conf->copies); 481 BUG_ON(slot != conf->copies);
482} 482}
483 483
484static sector_t raid10_find_virt(conf_t *conf, sector_t sector, int dev) 484static sector_t raid10_find_virt(struct r10conf *conf, sector_t sector, int dev)
485{ 485{
486 sector_t offset, chunk, vchunk; 486 sector_t offset, chunk, vchunk;
487 487
@@ -555,7 +555,7 @@ static int raid10_mergeable_bvec(struct request_queue *q,
555 * FIXME: possibly should rethink readbalancing and do it differently 555 * FIXME: possibly should rethink readbalancing and do it differently
556 * depending on near_copies / far_copies geometry. 556 * depending on near_copies / far_copies geometry.
557 */ 557 */
558static int read_balance(conf_t *conf, struct r10bio *r10_bio, int *max_sectors) 558static int read_balance(struct r10conf *conf, struct r10bio *r10_bio, int *max_sectors)
559{ 559{
560 const sector_t this_sector = r10_bio->sector; 560 const sector_t this_sector = r10_bio->sector;
561 int disk, slot; 561 int disk, slot;
@@ -678,7 +678,7 @@ retry:
678static int raid10_congested(void *data, int bits) 678static int raid10_congested(void *data, int bits)
679{ 679{
680 struct mddev *mddev = data; 680 struct mddev *mddev = data;
681 conf_t *conf = mddev->private; 681 struct r10conf *conf = mddev->private;
682 int i, ret = 0; 682 int i, ret = 0;
683 683
684 if (mddev_congested(mddev, bits)) 684 if (mddev_congested(mddev, bits))
@@ -696,7 +696,7 @@ static int raid10_congested(void *data, int bits)
696 return ret; 696 return ret;
697} 697}
698 698
699static void flush_pending_writes(conf_t *conf) 699static void flush_pending_writes(struct r10conf *conf)
700{ 700{
701 /* Any writes that have been queued but are awaiting 701 /* Any writes that have been queued but are awaiting
702 * bitmap updates get flushed here. 702 * bitmap updates get flushed here.
@@ -743,7 +743,7 @@ static void flush_pending_writes(conf_t *conf)
743 * lower_barrier when the particular background IO completes. 743 * lower_barrier when the particular background IO completes.
744 */ 744 */
745 745
746static void raise_barrier(conf_t *conf, int force) 746static void raise_barrier(struct r10conf *conf, int force)
747{ 747{
748 BUG_ON(force && !conf->barrier); 748 BUG_ON(force && !conf->barrier);
749 spin_lock_irq(&conf->resync_lock); 749 spin_lock_irq(&conf->resync_lock);
@@ -763,7 +763,7 @@ static void raise_barrier(conf_t *conf, int force)
763 spin_unlock_irq(&conf->resync_lock); 763 spin_unlock_irq(&conf->resync_lock);
764} 764}
765 765
766static void lower_barrier(conf_t *conf) 766static void lower_barrier(struct r10conf *conf)
767{ 767{
768 unsigned long flags; 768 unsigned long flags;
769 spin_lock_irqsave(&conf->resync_lock, flags); 769 spin_lock_irqsave(&conf->resync_lock, flags);
@@ -772,7 +772,7 @@ static void lower_barrier(conf_t *conf)
772 wake_up(&conf->wait_barrier); 772 wake_up(&conf->wait_barrier);
773} 773}
774 774
775static void wait_barrier(conf_t *conf) 775static void wait_barrier(struct r10conf *conf)
776{ 776{
777 spin_lock_irq(&conf->resync_lock); 777 spin_lock_irq(&conf->resync_lock);
778 if (conf->barrier) { 778 if (conf->barrier) {
@@ -786,7 +786,7 @@ static void wait_barrier(conf_t *conf)
786 spin_unlock_irq(&conf->resync_lock); 786 spin_unlock_irq(&conf->resync_lock);
787} 787}
788 788
789static void allow_barrier(conf_t *conf) 789static void allow_barrier(struct r10conf *conf)
790{ 790{
791 unsigned long flags; 791 unsigned long flags;
792 spin_lock_irqsave(&conf->resync_lock, flags); 792 spin_lock_irqsave(&conf->resync_lock, flags);
@@ -795,7 +795,7 @@ static void allow_barrier(conf_t *conf)
795 wake_up(&conf->wait_barrier); 795 wake_up(&conf->wait_barrier);
796} 796}
797 797
798static void freeze_array(conf_t *conf) 798static void freeze_array(struct r10conf *conf)
799{ 799{
800 /* stop syncio and normal IO and wait for everything to 800 /* stop syncio and normal IO and wait for everything to
801 * go quiet. 801 * go quiet.
@@ -820,7 +820,7 @@ static void freeze_array(conf_t *conf)
820 spin_unlock_irq(&conf->resync_lock); 820 spin_unlock_irq(&conf->resync_lock);
821} 821}
822 822
823static void unfreeze_array(conf_t *conf) 823static void unfreeze_array(struct r10conf *conf)
824{ 824{
825 /* reverse the effect of the freeze */ 825 /* reverse the effect of the freeze */
826 spin_lock_irq(&conf->resync_lock); 826 spin_lock_irq(&conf->resync_lock);
@@ -832,7 +832,7 @@ static void unfreeze_array(conf_t *conf)
832 832
833static int make_request(struct mddev *mddev, struct bio * bio) 833static int make_request(struct mddev *mddev, struct bio * bio)
834{ 834{
835 conf_t *conf = mddev->private; 835 struct r10conf *conf = mddev->private;
836 struct mirror_info *mirror; 836 struct mirror_info *mirror;
837 struct r10bio *r10_bio; 837 struct r10bio *r10_bio;
838 struct bio *read_bio; 838 struct bio *read_bio;
@@ -1163,7 +1163,7 @@ retry_write:
1163 1163
1164static void status(struct seq_file *seq, struct mddev *mddev) 1164static void status(struct seq_file *seq, struct mddev *mddev)
1165{ 1165{
1166 conf_t *conf = mddev->private; 1166 struct r10conf *conf = mddev->private;
1167 int i; 1167 int i;
1168 1168
1169 if (conf->near_copies < conf->raid_disks) 1169 if (conf->near_copies < conf->raid_disks)
@@ -1190,7 +1190,7 @@ static void status(struct seq_file *seq, struct mddev *mddev)
1190 * Don't consider the device numbered 'ignore' 1190 * Don't consider the device numbered 'ignore'
1191 * as we might be about to remove it. 1191 * as we might be about to remove it.
1192 */ 1192 */
1193static int enough(conf_t *conf, int ignore) 1193static int enough(struct r10conf *conf, int ignore)
1194{ 1194{
1195 int first = 0; 1195 int first = 0;
1196 1196
@@ -1212,7 +1212,7 @@ static int enough(conf_t *conf, int ignore)
1212static void error(struct mddev *mddev, struct md_rdev *rdev) 1212static void error(struct mddev *mddev, struct md_rdev *rdev)
1213{ 1213{
1214 char b[BDEVNAME_SIZE]; 1214 char b[BDEVNAME_SIZE];
1215 conf_t *conf = mddev->private; 1215 struct r10conf *conf = mddev->private;
1216 1216
1217 /* 1217 /*
1218 * If it is not operational, then we have already marked it as dead 1218 * If it is not operational, then we have already marked it as dead
@@ -1246,7 +1246,7 @@ static void error(struct mddev *mddev, struct md_rdev *rdev)
1246 mdname(mddev), conf->raid_disks - mddev->degraded); 1246 mdname(mddev), conf->raid_disks - mddev->degraded);
1247} 1247}
1248 1248
1249static void print_conf(conf_t *conf) 1249static void print_conf(struct r10conf *conf)
1250{ 1250{
1251 int i; 1251 int i;
1252 struct mirror_info *tmp; 1252 struct mirror_info *tmp;
@@ -1270,7 +1270,7 @@ static void print_conf(conf_t *conf)
1270 } 1270 }
1271} 1271}
1272 1272
1273static void close_sync(conf_t *conf) 1273static void close_sync(struct r10conf *conf)
1274{ 1274{
1275 wait_barrier(conf); 1275 wait_barrier(conf);
1276 allow_barrier(conf); 1276 allow_barrier(conf);
@@ -1282,7 +1282,7 @@ static void close_sync(conf_t *conf)
1282static int raid10_spare_active(struct mddev *mddev) 1282static int raid10_spare_active(struct mddev *mddev)
1283{ 1283{
1284 int i; 1284 int i;
1285 conf_t *conf = mddev->private; 1285 struct r10conf *conf = mddev->private;
1286 struct mirror_info *tmp; 1286 struct mirror_info *tmp;
1287 int count = 0; 1287 int count = 0;
1288 unsigned long flags; 1288 unsigned long flags;
@@ -1311,7 +1311,7 @@ static int raid10_spare_active(struct mddev *mddev)
1311 1311
1312static int raid10_add_disk(struct mddev *mddev, struct md_rdev *rdev) 1312static int raid10_add_disk(struct mddev *mddev, struct md_rdev *rdev)
1313{ 1313{
1314 conf_t *conf = mddev->private; 1314 struct r10conf *conf = mddev->private;
1315 int err = -EEXIST; 1315 int err = -EEXIST;
1316 int mirror; 1316 int mirror;
1317 int first = 0; 1317 int first = 0;
@@ -1370,7 +1370,7 @@ static int raid10_add_disk(struct mddev *mddev, struct md_rdev *rdev)
1370 1370
1371static int raid10_remove_disk(struct mddev *mddev, int number) 1371static int raid10_remove_disk(struct mddev *mddev, int number)
1372{ 1372{
1373 conf_t *conf = mddev->private; 1373 struct r10conf *conf = mddev->private;
1374 int err = 0; 1374 int err = 0;
1375 struct md_rdev *rdev; 1375 struct md_rdev *rdev;
1376 struct mirror_info *p = conf->mirrors+ number; 1376 struct mirror_info *p = conf->mirrors+ number;
@@ -1412,7 +1412,7 @@ abort:
1412static void end_sync_read(struct bio *bio, int error) 1412static void end_sync_read(struct bio *bio, int error)
1413{ 1413{
1414 struct r10bio *r10_bio = bio->bi_private; 1414 struct r10bio *r10_bio = bio->bi_private;
1415 conf_t *conf = r10_bio->mddev->private; 1415 struct r10conf *conf = r10_bio->mddev->private;
1416 int d; 1416 int d;
1417 1417
1418 d = find_bio_disk(conf, r10_bio, bio, NULL); 1418 d = find_bio_disk(conf, r10_bio, bio, NULL);
@@ -1471,7 +1471,7 @@ static void end_sync_write(struct bio *bio, int error)
1471 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 1471 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
1472 struct r10bio *r10_bio = bio->bi_private; 1472 struct r10bio *r10_bio = bio->bi_private;
1473 struct mddev *mddev = r10_bio->mddev; 1473 struct mddev *mddev = r10_bio->mddev;
1474 conf_t *conf = mddev->private; 1474 struct r10conf *conf = mddev->private;
1475 int d; 1475 int d;
1476 sector_t first_bad; 1476 sector_t first_bad;
1477 int bad_sectors; 1477 int bad_sectors;
@@ -1511,7 +1511,7 @@ static void end_sync_write(struct bio *bio, int error)
1511 */ 1511 */
1512static void sync_request_write(struct mddev *mddev, struct r10bio *r10_bio) 1512static void sync_request_write(struct mddev *mddev, struct r10bio *r10_bio)
1513{ 1513{
1514 conf_t *conf = mddev->private; 1514 struct r10conf *conf = mddev->private;
1515 int i, first; 1515 int i, first;
1516 struct bio *tbio, *fbio; 1516 struct bio *tbio, *fbio;
1517 1517
@@ -1619,7 +1619,7 @@ static void fix_recovery_read_error(struct r10bio *r10_bio)
1619 * new devices. 1619 * new devices.
1620 */ 1620 */
1621 struct mddev *mddev = r10_bio->mddev; 1621 struct mddev *mddev = r10_bio->mddev;
1622 conf_t *conf = mddev->private; 1622 struct r10conf *conf = mddev->private;
1623 struct bio *bio = r10_bio->devs[0].bio; 1623 struct bio *bio = r10_bio->devs[0].bio;
1624 sector_t sect = 0; 1624 sector_t sect = 0;
1625 int sectors = r10_bio->sectors; 1625 int sectors = r10_bio->sectors;
@@ -1690,7 +1690,7 @@ static void fix_recovery_read_error(struct r10bio *r10_bio)
1690 1690
1691static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio) 1691static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio)
1692{ 1692{
1693 conf_t *conf = mddev->private; 1693 struct r10conf *conf = mddev->private;
1694 int d; 1694 int d;
1695 struct bio *wbio; 1695 struct bio *wbio;
1696 1696
@@ -1778,7 +1778,7 @@ static int r10_sync_page_io(struct md_rdev *rdev, sector_t sector,
1778 * 3. Performs writes following reads for array synchronising. 1778 * 3. Performs writes following reads for array synchronising.
1779 */ 1779 */
1780 1780
1781static void fix_read_error(conf_t *conf, struct mddev *mddev, struct r10bio *r10_bio) 1781static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10bio *r10_bio)
1782{ 1782{
1783 int sect = 0; /* Offset from r10_bio->sector */ 1783 int sect = 0; /* Offset from r10_bio->sector */
1784 int sectors = r10_bio->sectors; 1784 int sectors = r10_bio->sectors;
@@ -1987,7 +1987,7 @@ static int narrow_write_error(struct r10bio *r10_bio, int i)
1987{ 1987{
1988 struct bio *bio = r10_bio->master_bio; 1988 struct bio *bio = r10_bio->master_bio;
1989 struct mddev *mddev = r10_bio->mddev; 1989 struct mddev *mddev = r10_bio->mddev;
1990 conf_t *conf = mddev->private; 1990 struct r10conf *conf = mddev->private;
1991 struct md_rdev *rdev = conf->mirrors[r10_bio->devs[i].devnum].rdev; 1991 struct md_rdev *rdev = conf->mirrors[r10_bio->devs[i].devnum].rdev;
1992 /* bio has the data to be written to slot 'i' where 1992 /* bio has the data to be written to slot 'i' where
1993 * we just recently had a write error. 1993 * we just recently had a write error.
@@ -2045,7 +2045,7 @@ static void handle_read_error(struct mddev *mddev, struct r10bio *r10_bio)
2045 int slot = r10_bio->read_slot; 2045 int slot = r10_bio->read_slot;
2046 int mirror = r10_bio->devs[slot].devnum; 2046 int mirror = r10_bio->devs[slot].devnum;
2047 struct bio *bio; 2047 struct bio *bio;
2048 conf_t *conf = mddev->private; 2048 struct r10conf *conf = mddev->private;
2049 struct md_rdev *rdev; 2049 struct md_rdev *rdev;
2050 char b[BDEVNAME_SIZE]; 2050 char b[BDEVNAME_SIZE];
2051 unsigned long do_sync; 2051 unsigned long do_sync;
@@ -2139,7 +2139,7 @@ read_more:
2139 generic_make_request(bio); 2139 generic_make_request(bio);
2140} 2140}
2141 2141
2142static void handle_write_completed(conf_t *conf, struct r10bio *r10_bio) 2142static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio)
2143{ 2143{
2144 /* Some sort of write request has finished and it 2144 /* Some sort of write request has finished and it
2145 * succeeded in writing where we thought there was a 2145 * succeeded in writing where we thought there was a
@@ -2204,7 +2204,7 @@ static void raid10d(struct mddev *mddev)
2204{ 2204{
2205 struct r10bio *r10_bio; 2205 struct r10bio *r10_bio;
2206 unsigned long flags; 2206 unsigned long flags;
2207 conf_t *conf = mddev->private; 2207 struct r10conf *conf = mddev->private;
2208 struct list_head *head = &conf->retry_list; 2208 struct list_head *head = &conf->retry_list;
2209 struct blk_plug plug; 2209 struct blk_plug plug;
2210 2210
@@ -2252,7 +2252,7 @@ static void raid10d(struct mddev *mddev)
2252} 2252}
2253 2253
2254 2254
2255static int init_resync(conf_t *conf) 2255static int init_resync(struct r10conf *conf)
2256{ 2256{
2257 int buffs; 2257 int buffs;
2258 2258
@@ -2300,7 +2300,7 @@ static int init_resync(conf_t *conf)
2300static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, 2300static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
2301 int *skipped, int go_faster) 2301 int *skipped, int go_faster)
2302{ 2302{
2303 conf_t *conf = mddev->private; 2303 struct r10conf *conf = mddev->private;
2304 struct r10bio *r10_bio; 2304 struct r10bio *r10_bio;
2305 struct bio *biolist = NULL, *bio; 2305 struct bio *biolist = NULL, *bio;
2306 sector_t max_sector, nr_sectors; 2306 sector_t max_sector, nr_sectors;
@@ -2717,7 +2717,7 @@ static sector_t
2717raid10_size(struct mddev *mddev, sector_t sectors, int raid_disks) 2717raid10_size(struct mddev *mddev, sector_t sectors, int raid_disks)
2718{ 2718{
2719 sector_t size; 2719 sector_t size;
2720 conf_t *conf = mddev->private; 2720 struct r10conf *conf = mddev->private;
2721 2721
2722 if (!raid_disks) 2722 if (!raid_disks)
2723 raid_disks = conf->raid_disks; 2723 raid_disks = conf->raid_disks;
@@ -2733,9 +2733,9 @@ raid10_size(struct mddev *mddev, sector_t sectors, int raid_disks)
2733} 2733}
2734 2734
2735 2735
2736static conf_t *setup_conf(struct mddev *mddev) 2736static struct r10conf *setup_conf(struct mddev *mddev)
2737{ 2737{
2738 conf_t *conf = NULL; 2738 struct r10conf *conf = NULL;
2739 int nc, fc, fo; 2739 int nc, fc, fo;
2740 sector_t stride, size; 2740 sector_t stride, size;
2741 int err = -EINVAL; 2741 int err = -EINVAL;
@@ -2760,7 +2760,7 @@ static conf_t *setup_conf(struct mddev *mddev)
2760 } 2760 }
2761 2761
2762 err = -ENOMEM; 2762 err = -ENOMEM;
2763 conf = kzalloc(sizeof(conf_t), GFP_KERNEL); 2763 conf = kzalloc(sizeof(struct r10conf), GFP_KERNEL);
2764 if (!conf) 2764 if (!conf)
2765 goto out; 2765 goto out;
2766 2766
@@ -2838,7 +2838,7 @@ static conf_t *setup_conf(struct mddev *mddev)
2838 2838
2839static int run(struct mddev *mddev) 2839static int run(struct mddev *mddev)
2840{ 2840{
2841 conf_t *conf; 2841 struct r10conf *conf;
2842 int i, disk_idx, chunk_size; 2842 int i, disk_idx, chunk_size;
2843 struct mirror_info *disk; 2843 struct mirror_info *disk;
2844 struct md_rdev *rdev; 2844 struct md_rdev *rdev;
@@ -2968,7 +2968,7 @@ out:
2968 2968
2969static int stop(struct mddev *mddev) 2969static int stop(struct mddev *mddev)
2970{ 2970{
2971 conf_t *conf = mddev->private; 2971 struct r10conf *conf = mddev->private;
2972 2972
2973 raise_barrier(conf, 0); 2973 raise_barrier(conf, 0);
2974 lower_barrier(conf); 2974 lower_barrier(conf);
@@ -2985,7 +2985,7 @@ static int stop(struct mddev *mddev)
2985 2985
2986static void raid10_quiesce(struct mddev *mddev, int state) 2986static void raid10_quiesce(struct mddev *mddev, int state)
2987{ 2987{
2988 conf_t *conf = mddev->private; 2988 struct r10conf *conf = mddev->private;
2989 2989
2990 switch(state) { 2990 switch(state) {
2991 case 1: 2991 case 1:
@@ -3000,7 +3000,7 @@ static void raid10_quiesce(struct mddev *mddev, int state)
3000static void *raid10_takeover_raid0(struct mddev *mddev) 3000static void *raid10_takeover_raid0(struct mddev *mddev)
3001{ 3001{
3002 struct md_rdev *rdev; 3002 struct md_rdev *rdev;
3003 conf_t *conf; 3003 struct r10conf *conf;
3004 3004
3005 if (mddev->degraded > 0) { 3005 if (mddev->degraded > 0) {
3006 printk(KERN_ERR "md/raid10:%s: Error: degraded raid0!\n", 3006 printk(KERN_ERR "md/raid10:%s: Error: degraded raid0!\n",
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h
index 94f898a11be4..35489a569597 100644
--- a/drivers/md/raid10.h
+++ b/drivers/md/raid10.h
@@ -11,7 +11,7 @@ struct mirror_info {
11 */ 11 */
12}; 12};
13 13
14struct r10_private_data_s { 14struct r10conf {
15 struct mddev *mddev; 15 struct mddev *mddev;
16 struct mirror_info *mirrors; 16 struct mirror_info *mirrors;
17 int raid_disks; 17 int raid_disks;
@@ -67,8 +67,6 @@ struct r10_private_data_s {
67 struct md_thread *thread; 67 struct md_thread *thread;
68}; 68};
69 69
70typedef struct r10_private_data_s conf_t;
71
72/* 70/*
73 * this is our 'private' RAID10 bio. 71 * this is our 'private' RAID10 bio.
74 * 72 *