aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-10-11 01:49:52 -0400
committerNeilBrown <neilb@suse.de>2011-10-11 01:49:52 -0400
commitd1688a6d5515f1900af76a963b4bb6d9a6554cfa (patch)
tree2ed2b1001804b6982697c3785f06580a4e84e31b /drivers/md
parente8096360476689898f038feebf5b352c9ec43a2a (diff)
md/raid5: typedef removal: raid5_conf_t -> struct r5conf
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-raid.c4
-rw-r--r--drivers/md/raid5.c158
-rw-r--r--drivers/md/raid5.h8
3 files changed, 84 insertions, 86 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index c0c30d880447..220aefc80d15 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -1097,7 +1097,7 @@ static int raid_status(struct dm_target *ti, status_type_t type,
1097 rs->md.bitmap_info.max_write_behind); 1097 rs->md.bitmap_info.max_write_behind);
1098 1098
1099 if (rs->print_flags & DMPF_STRIPE_CACHE) { 1099 if (rs->print_flags & DMPF_STRIPE_CACHE) {
1100 raid5_conf_t *conf = rs->md.private; 1100 struct r5conf *conf = rs->md.private;
1101 1101
1102 /* convert from kiB to sectors */ 1102 /* convert from kiB to sectors */
1103 DMEMIT(" stripe_cache %d", 1103 DMEMIT(" stripe_cache %d",
@@ -1146,7 +1146,7 @@ static void raid_io_hints(struct dm_target *ti, struct queue_limits *limits)
1146{ 1146{
1147 struct raid_set *rs = ti->private; 1147 struct raid_set *rs = ti->private;
1148 unsigned chunk_size = rs->md.chunk_sectors << 9; 1148 unsigned chunk_size = rs->md.chunk_sectors << 9;
1149 raid5_conf_t *conf = rs->md.private; 1149 struct r5conf *conf = rs->md.private;
1150 1150
1151 blk_limits_io_min(limits, chunk_size); 1151 blk_limits_io_min(limits, chunk_size);
1152 blk_limits_io_opt(limits, chunk_size * (conf->raid_disks - conf->max_degraded)); 1152 blk_limits_io_opt(limits, chunk_size * (conf->raid_disks - conf->max_degraded));
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 8514e9aeb369..921e96670ad4 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -70,7 +70,7 @@
70#define NR_HASH (PAGE_SIZE / sizeof(struct hlist_head)) 70#define NR_HASH (PAGE_SIZE / sizeof(struct hlist_head))
71#define HASH_MASK (NR_HASH - 1) 71#define HASH_MASK (NR_HASH - 1)
72 72
73static inline struct hlist_head *stripe_hash(raid5_conf_t *conf, sector_t sect) 73static inline struct hlist_head *stripe_hash(struct r5conf *conf, sector_t sect)
74{ 74{
75 int hash = (sect >> STRIPE_SHIFT) & HASH_MASK; 75 int hash = (sect >> STRIPE_SHIFT) & HASH_MASK;
76 return &conf->stripe_hashtbl[hash]; 76 return &conf->stripe_hashtbl[hash];
@@ -180,7 +180,7 @@ static void return_io(struct bio *return_bi)
180 } 180 }
181} 181}
182 182
183static void print_raid5_conf (raid5_conf_t *conf); 183static void print_raid5_conf (struct r5conf *conf);
184 184
185static int stripe_operations_active(struct stripe_head *sh) 185static int stripe_operations_active(struct stripe_head *sh)
186{ 186{
@@ -189,7 +189,7 @@ static int stripe_operations_active(struct stripe_head *sh)
189 test_bit(STRIPE_COMPUTE_RUN, &sh->state); 189 test_bit(STRIPE_COMPUTE_RUN, &sh->state);
190} 190}
191 191
192static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh) 192static void __release_stripe(struct r5conf *conf, struct stripe_head *sh)
193{ 193{
194 if (atomic_dec_and_test(&sh->count)) { 194 if (atomic_dec_and_test(&sh->count)) {
195 BUG_ON(!list_empty(&sh->lru)); 195 BUG_ON(!list_empty(&sh->lru));
@@ -225,7 +225,7 @@ static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
225 225
226static void release_stripe(struct stripe_head *sh) 226static void release_stripe(struct stripe_head *sh)
227{ 227{
228 raid5_conf_t *conf = sh->raid_conf; 228 struct r5conf *conf = sh->raid_conf;
229 unsigned long flags; 229 unsigned long flags;
230 230
231 spin_lock_irqsave(&conf->device_lock, flags); 231 spin_lock_irqsave(&conf->device_lock, flags);
@@ -241,7 +241,7 @@ static inline void remove_hash(struct stripe_head *sh)
241 hlist_del_init(&sh->hash); 241 hlist_del_init(&sh->hash);
242} 242}
243 243
244static inline void insert_hash(raid5_conf_t *conf, struct stripe_head *sh) 244static inline void insert_hash(struct r5conf *conf, struct stripe_head *sh)
245{ 245{
246 struct hlist_head *hp = stripe_hash(conf, sh->sector); 246 struct hlist_head *hp = stripe_hash(conf, sh->sector);
247 247
@@ -253,7 +253,7 @@ static inline void insert_hash(raid5_conf_t *conf, struct stripe_head *sh)
253 253
254 254
255/* find an idle stripe, make sure it is unhashed, and return it. */ 255/* find an idle stripe, make sure it is unhashed, and return it. */
256static struct stripe_head *get_free_stripe(raid5_conf_t *conf) 256static struct stripe_head *get_free_stripe(struct r5conf *conf)
257{ 257{
258 struct stripe_head *sh = NULL; 258 struct stripe_head *sh = NULL;
259 struct list_head *first; 259 struct list_head *first;
@@ -301,12 +301,12 @@ static int grow_buffers(struct stripe_head *sh)
301} 301}
302 302
303static void raid5_build_block(struct stripe_head *sh, int i, int previous); 303static void raid5_build_block(struct stripe_head *sh, int i, int previous);
304static void stripe_set_idx(sector_t stripe, raid5_conf_t *conf, int previous, 304static void stripe_set_idx(sector_t stripe, struct r5conf *conf, int previous,
305 struct stripe_head *sh); 305 struct stripe_head *sh);
306 306
307static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) 307static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
308{ 308{
309 raid5_conf_t *conf = sh->raid_conf; 309 struct r5conf *conf = sh->raid_conf;
310 int i; 310 int i;
311 311
312 BUG_ON(atomic_read(&sh->count) != 0); 312 BUG_ON(atomic_read(&sh->count) != 0);
@@ -342,7 +342,7 @@ static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
342 insert_hash(conf, sh); 342 insert_hash(conf, sh);
343} 343}
344 344
345static struct stripe_head *__find_stripe(raid5_conf_t *conf, sector_t sector, 345static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector,
346 short generation) 346 short generation)
347{ 347{
348 struct stripe_head *sh; 348 struct stripe_head *sh;
@@ -369,7 +369,7 @@ static struct stripe_head *__find_stripe(raid5_conf_t *conf, sector_t sector,
369 * of the two sections, and some non-in_sync devices may 369 * of the two sections, and some non-in_sync devices may
370 * be insync in the section most affected by failed devices. 370 * be insync in the section most affected by failed devices.
371 */ 371 */
372static int has_failed(raid5_conf_t *conf) 372static int has_failed(struct r5conf *conf)
373{ 373{
374 int degraded; 374 int degraded;
375 int i; 375 int i;
@@ -424,7 +424,7 @@ static int has_failed(raid5_conf_t *conf)
424} 424}
425 425
426static struct stripe_head * 426static struct stripe_head *
427get_active_stripe(raid5_conf_t *conf, sector_t sector, 427get_active_stripe(struct r5conf *conf, sector_t sector,
428 int previous, int noblock, int noquiesce) 428 int previous, int noblock, int noquiesce)
429{ 429{
430 struct stripe_head *sh; 430 struct stripe_head *sh;
@@ -484,7 +484,7 @@ raid5_end_write_request(struct bio *bi, int error);
484 484
485static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) 485static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
486{ 486{
487 raid5_conf_t *conf = sh->raid_conf; 487 struct r5conf *conf = sh->raid_conf;
488 int i, disks = sh->disks; 488 int i, disks = sh->disks;
489 489
490 might_sleep(); 490 might_sleep();
@@ -643,7 +643,7 @@ static void ops_complete_biofill(void *stripe_head_ref)
643{ 643{
644 struct stripe_head *sh = stripe_head_ref; 644 struct stripe_head *sh = stripe_head_ref;
645 struct bio *return_bi = NULL; 645 struct bio *return_bi = NULL;
646 raid5_conf_t *conf = sh->raid_conf; 646 struct r5conf *conf = sh->raid_conf;
647 int i; 647 int i;
648 648
649 pr_debug("%s: stripe %llu\n", __func__, 649 pr_debug("%s: stripe %llu\n", __func__,
@@ -688,7 +688,7 @@ static void ops_complete_biofill(void *stripe_head_ref)
688static void ops_run_biofill(struct stripe_head *sh) 688static void ops_run_biofill(struct stripe_head *sh)
689{ 689{
690 struct dma_async_tx_descriptor *tx = NULL; 690 struct dma_async_tx_descriptor *tx = NULL;
691 raid5_conf_t *conf = sh->raid_conf; 691 struct r5conf *conf = sh->raid_conf;
692 struct async_submit_ctl submit; 692 struct async_submit_ctl submit;
693 int i; 693 int i;
694 694
@@ -1239,7 +1239,7 @@ static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request)
1239{ 1239{
1240 int overlap_clear = 0, i, disks = sh->disks; 1240 int overlap_clear = 0, i, disks = sh->disks;
1241 struct dma_async_tx_descriptor *tx = NULL; 1241 struct dma_async_tx_descriptor *tx = NULL;
1242 raid5_conf_t *conf = sh->raid_conf; 1242 struct r5conf *conf = sh->raid_conf;
1243 int level = conf->level; 1243 int level = conf->level;
1244 struct raid5_percpu *percpu; 1244 struct raid5_percpu *percpu;
1245 unsigned long cpu; 1245 unsigned long cpu;
@@ -1330,7 +1330,7 @@ static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request)
1330#define raid_run_ops __raid_run_ops 1330#define raid_run_ops __raid_run_ops
1331#endif 1331#endif
1332 1332
1333static int grow_one_stripe(raid5_conf_t *conf) 1333static int grow_one_stripe(struct r5conf *conf)
1334{ 1334{
1335 struct stripe_head *sh; 1335 struct stripe_head *sh;
1336 sh = kmem_cache_zalloc(conf->slab_cache, GFP_KERNEL); 1336 sh = kmem_cache_zalloc(conf->slab_cache, GFP_KERNEL);
@@ -1355,7 +1355,7 @@ static int grow_one_stripe(raid5_conf_t *conf)
1355 return 1; 1355 return 1;
1356} 1356}
1357 1357
1358static int grow_stripes(raid5_conf_t *conf, int num) 1358static int grow_stripes(struct r5conf *conf, int num)
1359{ 1359{
1360 struct kmem_cache *sc; 1360 struct kmem_cache *sc;
1361 int devs = max(conf->raid_disks, conf->previous_raid_disks); 1361 int devs = max(conf->raid_disks, conf->previous_raid_disks);
@@ -1404,7 +1404,7 @@ static size_t scribble_len(int num)
1404 return len; 1404 return len;
1405} 1405}
1406 1406
1407static int resize_stripes(raid5_conf_t *conf, int newsize) 1407static int resize_stripes(struct r5conf *conf, int newsize)
1408{ 1408{
1409 /* Make all the stripes able to hold 'newsize' devices. 1409 /* Make all the stripes able to hold 'newsize' devices.
1410 * New slots in each stripe get 'page' set to a new page. 1410 * New slots in each stripe get 'page' set to a new page.
@@ -1549,7 +1549,7 @@ static int resize_stripes(raid5_conf_t *conf, int newsize)
1549 return err; 1549 return err;
1550} 1550}
1551 1551
1552static int drop_one_stripe(raid5_conf_t *conf) 1552static int drop_one_stripe(struct r5conf *conf)
1553{ 1553{
1554 struct stripe_head *sh; 1554 struct stripe_head *sh;
1555 1555
@@ -1565,7 +1565,7 @@ static int drop_one_stripe(raid5_conf_t *conf)
1565 return 1; 1565 return 1;
1566} 1566}
1567 1567
1568static void shrink_stripes(raid5_conf_t *conf) 1568static void shrink_stripes(struct r5conf *conf)
1569{ 1569{
1570 while (drop_one_stripe(conf)) 1570 while (drop_one_stripe(conf))
1571 ; 1571 ;
@@ -1578,7 +1578,7 @@ static void shrink_stripes(raid5_conf_t *conf)
1578static void raid5_end_read_request(struct bio * bi, int error) 1578static void raid5_end_read_request(struct bio * bi, int error)
1579{ 1579{
1580 struct stripe_head *sh = bi->bi_private; 1580 struct stripe_head *sh = bi->bi_private;
1581 raid5_conf_t *conf = sh->raid_conf; 1581 struct r5conf *conf = sh->raid_conf;
1582 int disks = sh->disks, i; 1582 int disks = sh->disks, i;
1583 int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); 1583 int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags);
1584 char b[BDEVNAME_SIZE]; 1584 char b[BDEVNAME_SIZE];
@@ -1665,7 +1665,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
1665static void raid5_end_write_request(struct bio *bi, int error) 1665static void raid5_end_write_request(struct bio *bi, int error)
1666{ 1666{
1667 struct stripe_head *sh = bi->bi_private; 1667 struct stripe_head *sh = bi->bi_private;
1668 raid5_conf_t *conf = sh->raid_conf; 1668 struct r5conf *conf = sh->raid_conf;
1669 int disks = sh->disks, i; 1669 int disks = sh->disks, i;
1670 int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); 1670 int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags);
1671 sector_t first_bad; 1671 sector_t first_bad;
@@ -1722,7 +1722,7 @@ static void raid5_build_block(struct stripe_head *sh, int i, int previous)
1722static void error(struct mddev *mddev, struct md_rdev *rdev) 1722static void error(struct mddev *mddev, struct md_rdev *rdev)
1723{ 1723{
1724 char b[BDEVNAME_SIZE]; 1724 char b[BDEVNAME_SIZE];
1725 raid5_conf_t *conf = mddev->private; 1725 struct r5conf *conf = mddev->private;
1726 pr_debug("raid456: error called\n"); 1726 pr_debug("raid456: error called\n");
1727 1727
1728 if (test_and_clear_bit(In_sync, &rdev->flags)) { 1728 if (test_and_clear_bit(In_sync, &rdev->flags)) {
@@ -1751,7 +1751,7 @@ static void error(struct mddev *mddev, struct md_rdev *rdev)
1751 * Input: a 'big' sector number, 1751 * Input: a 'big' sector number,
1752 * Output: index of the data and parity disk, and the sector # in them. 1752 * Output: index of the data and parity disk, and the sector # in them.
1753 */ 1753 */
1754static sector_t raid5_compute_sector(raid5_conf_t *conf, sector_t r_sector, 1754static sector_t raid5_compute_sector(struct r5conf *conf, sector_t r_sector,
1755 int previous, int *dd_idx, 1755 int previous, int *dd_idx,
1756 struct stripe_head *sh) 1756 struct stripe_head *sh)
1757{ 1757{
@@ -1956,7 +1956,7 @@ static sector_t raid5_compute_sector(raid5_conf_t *conf, sector_t r_sector,
1956 1956
1957static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous) 1957static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous)
1958{ 1958{
1959 raid5_conf_t *conf = sh->raid_conf; 1959 struct r5conf *conf = sh->raid_conf;
1960 int raid_disks = sh->disks; 1960 int raid_disks = sh->disks;
1961 int data_disks = raid_disks - conf->max_degraded; 1961 int data_disks = raid_disks - conf->max_degraded;
1962 sector_t new_sector = sh->sector, check; 1962 sector_t new_sector = sh->sector, check;
@@ -2081,7 +2081,7 @@ schedule_reconstruction(struct stripe_head *sh, struct stripe_head_state *s,
2081 int rcw, int expand) 2081 int rcw, int expand)
2082{ 2082{
2083 int i, pd_idx = sh->pd_idx, disks = sh->disks; 2083 int i, pd_idx = sh->pd_idx, disks = sh->disks;
2084 raid5_conf_t *conf = sh->raid_conf; 2084 struct r5conf *conf = sh->raid_conf;
2085 int level = conf->level; 2085 int level = conf->level;
2086 2086
2087 if (rcw) { 2087 if (rcw) {
@@ -2166,7 +2166,7 @@ schedule_reconstruction(struct stripe_head *sh, struct stripe_head_state *s,
2166static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) 2166static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
2167{ 2167{
2168 struct bio **bip; 2168 struct bio **bip;
2169 raid5_conf_t *conf = sh->raid_conf; 2169 struct r5conf *conf = sh->raid_conf;
2170 int firstwrite=0; 2170 int firstwrite=0;
2171 2171
2172 pr_debug("adding bi b#%llu to stripe s#%llu\n", 2172 pr_debug("adding bi b#%llu to stripe s#%llu\n",
@@ -2228,9 +2228,9 @@ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, in
2228 return 0; 2228 return 0;
2229} 2229}
2230 2230
2231static void end_reshape(raid5_conf_t *conf); 2231static void end_reshape(struct r5conf *conf);
2232 2232
2233static void stripe_set_idx(sector_t stripe, raid5_conf_t *conf, int previous, 2233static void stripe_set_idx(sector_t stripe, struct r5conf *conf, int previous,
2234 struct stripe_head *sh) 2234 struct stripe_head *sh)
2235{ 2235{
2236 int sectors_per_chunk = 2236 int sectors_per_chunk =
@@ -2247,7 +2247,7 @@ static void stripe_set_idx(sector_t stripe, raid5_conf_t *conf, int previous,
2247} 2247}
2248 2248
2249static void 2249static void
2250handle_failed_stripe(raid5_conf_t *conf, struct stripe_head *sh, 2250handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
2251 struct stripe_head_state *s, int disks, 2251 struct stripe_head_state *s, int disks,
2252 struct bio **return_bi) 2252 struct bio **return_bi)
2253{ 2253{
@@ -2352,7 +2352,7 @@ handle_failed_stripe(raid5_conf_t *conf, struct stripe_head *sh,
2352} 2352}
2353 2353
2354static void 2354static void
2355handle_failed_sync(raid5_conf_t *conf, struct stripe_head *sh, 2355handle_failed_sync(struct r5conf *conf, struct stripe_head *sh,
2356 struct stripe_head_state *s) 2356 struct stripe_head_state *s)
2357{ 2357{
2358 int abort = 0; 2358 int abort = 0;
@@ -2501,7 +2501,7 @@ static void handle_stripe_fill(struct stripe_head *sh,
2501 * Note that if we 'wrote' to a failed drive, it will be UPTODATE, but 2501 * Note that if we 'wrote' to a failed drive, it will be UPTODATE, but
2502 * never LOCKED, so we don't need to test 'failed' directly. 2502 * never LOCKED, so we don't need to test 'failed' directly.
2503 */ 2503 */
2504static void handle_stripe_clean_event(raid5_conf_t *conf, 2504static void handle_stripe_clean_event(struct r5conf *conf,
2505 struct stripe_head *sh, int disks, struct bio **return_bi) 2505 struct stripe_head *sh, int disks, struct bio **return_bi)
2506{ 2506{
2507 int i; 2507 int i;
@@ -2546,7 +2546,7 @@ static void handle_stripe_clean_event(raid5_conf_t *conf,
2546 md_wakeup_thread(conf->mddev->thread); 2546 md_wakeup_thread(conf->mddev->thread);
2547} 2547}
2548 2548
2549static void handle_stripe_dirtying(raid5_conf_t *conf, 2549static void handle_stripe_dirtying(struct r5conf *conf,
2550 struct stripe_head *sh, 2550 struct stripe_head *sh,
2551 struct stripe_head_state *s, 2551 struct stripe_head_state *s,
2552 int disks) 2552 int disks)
@@ -2648,7 +2648,7 @@ static void handle_stripe_dirtying(raid5_conf_t *conf,
2648 schedule_reconstruction(sh, s, rcw == 0, 0); 2648 schedule_reconstruction(sh, s, rcw == 0, 0);
2649} 2649}
2650 2650
2651static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, 2651static void handle_parity_checks5(struct r5conf *conf, struct stripe_head *sh,
2652 struct stripe_head_state *s, int disks) 2652 struct stripe_head_state *s, int disks)
2653{ 2653{
2654 struct r5dev *dev = NULL; 2654 struct r5dev *dev = NULL;
@@ -2736,7 +2736,7 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
2736} 2736}
2737 2737
2738 2738
2739static void handle_parity_checks6(raid5_conf_t *conf, struct stripe_head *sh, 2739static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
2740 struct stripe_head_state *s, 2740 struct stripe_head_state *s,
2741 int disks) 2741 int disks)
2742{ 2742{
@@ -2899,7 +2899,7 @@ static void handle_parity_checks6(raid5_conf_t *conf, struct stripe_head *sh,
2899 } 2899 }
2900} 2900}
2901 2901
2902static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh) 2902static void handle_stripe_expansion(struct r5conf *conf, struct stripe_head *sh)
2903{ 2903{
2904 int i; 2904 int i;
2905 2905
@@ -2978,7 +2978,7 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh)
2978 2978
2979static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s) 2979static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
2980{ 2980{
2981 raid5_conf_t *conf = sh->raid_conf; 2981 struct r5conf *conf = sh->raid_conf;
2982 int disks = sh->disks; 2982 int disks = sh->disks;
2983 struct r5dev *dev; 2983 struct r5dev *dev;
2984 int i; 2984 int i;
@@ -3102,7 +3102,7 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
3102static void handle_stripe(struct stripe_head *sh) 3102static void handle_stripe(struct stripe_head *sh)
3103{ 3103{
3104 struct stripe_head_state s; 3104 struct stripe_head_state s;
3105 raid5_conf_t *conf = sh->raid_conf; 3105 struct r5conf *conf = sh->raid_conf;
3106 int i; 3106 int i;
3107 int prexor; 3107 int prexor;
3108 int disks = sh->disks; 3108 int disks = sh->disks;
@@ -3373,7 +3373,7 @@ finish:
3373 clear_bit(STRIPE_ACTIVE, &sh->state); 3373 clear_bit(STRIPE_ACTIVE, &sh->state);
3374} 3374}
3375 3375
3376static void raid5_activate_delayed(raid5_conf_t *conf) 3376static void raid5_activate_delayed(struct r5conf *conf)
3377{ 3377{
3378 if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) { 3378 if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) {
3379 while (!list_empty(&conf->delayed_list)) { 3379 while (!list_empty(&conf->delayed_list)) {
@@ -3389,7 +3389,7 @@ static void raid5_activate_delayed(raid5_conf_t *conf)
3389 } 3389 }
3390} 3390}
3391 3391
3392static void activate_bit_delay(raid5_conf_t *conf) 3392static void activate_bit_delay(struct r5conf *conf)
3393{ 3393{
3394 /* device_lock is held */ 3394 /* device_lock is held */
3395 struct list_head head; 3395 struct list_head head;
@@ -3405,7 +3405,7 @@ static void activate_bit_delay(raid5_conf_t *conf)
3405 3405
3406int md_raid5_congested(struct mddev *mddev, int bits) 3406int md_raid5_congested(struct mddev *mddev, int bits)
3407{ 3407{
3408 raid5_conf_t *conf = mddev->private; 3408 struct r5conf *conf = mddev->private;
3409 3409
3410 /* No difference between reads and writes. Just check 3410 /* No difference between reads and writes. Just check
3411 * how busy the stripe_cache is 3411 * how busy the stripe_cache is
@@ -3473,7 +3473,7 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)
3473 * add bio to the retry LIFO ( in O(1) ... we are in interrupt ) 3473 * add bio to the retry LIFO ( in O(1) ... we are in interrupt )
3474 * later sampled by raid5d. 3474 * later sampled by raid5d.
3475 */ 3475 */
3476static void add_bio_to_retry(struct bio *bi,raid5_conf_t *conf) 3476static void add_bio_to_retry(struct bio *bi,struct r5conf *conf)
3477{ 3477{
3478 unsigned long flags; 3478 unsigned long flags;
3479 3479
@@ -3487,7 +3487,7 @@ static void add_bio_to_retry(struct bio *bi,raid5_conf_t *conf)
3487} 3487}
3488 3488
3489 3489
3490static struct bio *remove_bio_from_retry(raid5_conf_t *conf) 3490static struct bio *remove_bio_from_retry(struct r5conf *conf)
3491{ 3491{
3492 struct bio *bi; 3492 struct bio *bi;
3493 3493
@@ -3521,7 +3521,7 @@ static void raid5_align_endio(struct bio *bi, int error)
3521{ 3521{
3522 struct bio* raid_bi = bi->bi_private; 3522 struct bio* raid_bi = bi->bi_private;
3523 struct mddev *mddev; 3523 struct mddev *mddev;
3524 raid5_conf_t *conf; 3524 struct r5conf *conf;
3525 int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); 3525 int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags);
3526 struct md_rdev *rdev; 3526 struct md_rdev *rdev;
3527 3527
@@ -3569,7 +3569,7 @@ static int bio_fits_rdev(struct bio *bi)
3569 3569
3570static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio) 3570static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio)
3571{ 3571{
3572 raid5_conf_t *conf = mddev->private; 3572 struct r5conf *conf = mddev->private;
3573 int dd_idx; 3573 int dd_idx;
3574 struct bio* align_bi; 3574 struct bio* align_bi;
3575 struct md_rdev *rdev; 3575 struct md_rdev *rdev;
@@ -3645,7 +3645,7 @@ static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio)
3645 * head of the hold_list has changed, i.e. the head was promoted to the 3645 * head of the hold_list has changed, i.e. the head was promoted to the
3646 * handle_list. 3646 * handle_list.
3647 */ 3647 */
3648static struct stripe_head *__get_priority_stripe(raid5_conf_t *conf) 3648static struct stripe_head *__get_priority_stripe(struct r5conf *conf)
3649{ 3649{
3650 struct stripe_head *sh; 3650 struct stripe_head *sh;
3651 3651
@@ -3690,7 +3690,7 @@ static struct stripe_head *__get_priority_stripe(raid5_conf_t *conf)
3690 3690
3691static int make_request(struct mddev *mddev, struct bio * bi) 3691static int make_request(struct mddev *mddev, struct bio * bi)
3692{ 3692{
3693 raid5_conf_t *conf = mddev->private; 3693 struct r5conf *conf = mddev->private;
3694 int dd_idx; 3694 int dd_idx;
3695 sector_t new_sector; 3695 sector_t new_sector;
3696 sector_t logical_sector, last_sector; 3696 sector_t logical_sector, last_sector;
@@ -3861,7 +3861,7 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, int *sk
3861 * As the reads complete, handle_stripe will copy the data 3861 * As the reads complete, handle_stripe will copy the data
3862 * into the destination stripe and release that stripe. 3862 * into the destination stripe and release that stripe.
3863 */ 3863 */
3864 raid5_conf_t *conf = mddev->private; 3864 struct r5conf *conf = mddev->private;
3865 struct stripe_head *sh; 3865 struct stripe_head *sh;
3866 sector_t first_sector, last_sector; 3866 sector_t first_sector, last_sector;
3867 int raid_disks = conf->previous_raid_disks; 3867 int raid_disks = conf->previous_raid_disks;
@@ -4070,7 +4070,7 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, int *sk
4070/* FIXME go_faster isn't used */ 4070/* FIXME go_faster isn't used */
4071static inline sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipped, int go_faster) 4071static inline sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipped, int go_faster)
4072{ 4072{
4073 raid5_conf_t *conf = mddev->private; 4073 struct r5conf *conf = mddev->private;
4074 struct stripe_head *sh; 4074 struct stripe_head *sh;
4075 sector_t max_sector = mddev->dev_sectors; 4075 sector_t max_sector = mddev->dev_sectors;
4076 sector_t sync_blocks; 4076 sector_t sync_blocks;
@@ -4155,7 +4155,7 @@ static inline sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int
4155 return STRIPE_SECTORS; 4155 return STRIPE_SECTORS;
4156} 4156}
4157 4157
4158static int retry_aligned_read(raid5_conf_t *conf, struct bio *raid_bio) 4158static int retry_aligned_read(struct r5conf *conf, struct bio *raid_bio)
4159{ 4159{
4160 /* We may not be able to submit a whole bio at once as there 4160 /* We may not be able to submit a whole bio at once as there
4161 * may not be enough stripe_heads available. 4161 * may not be enough stripe_heads available.
@@ -4230,7 +4230,7 @@ static int retry_aligned_read(raid5_conf_t *conf, struct bio *raid_bio)
4230static void raid5d(struct mddev *mddev) 4230static void raid5d(struct mddev *mddev)
4231{ 4231{
4232 struct stripe_head *sh; 4232 struct stripe_head *sh;
4233 raid5_conf_t *conf = mddev->private; 4233 struct r5conf *conf = mddev->private;
4234 int handled; 4234 int handled;
4235 struct blk_plug plug; 4235 struct blk_plug plug;
4236 4236
@@ -4296,7 +4296,7 @@ static void raid5d(struct mddev *mddev)
4296static ssize_t 4296static ssize_t
4297raid5_show_stripe_cache_size(struct mddev *mddev, char *page) 4297raid5_show_stripe_cache_size(struct mddev *mddev, char *page)
4298{ 4298{
4299 raid5_conf_t *conf = mddev->private; 4299 struct r5conf *conf = mddev->private;
4300 if (conf) 4300 if (conf)
4301 return sprintf(page, "%d\n", conf->max_nr_stripes); 4301 return sprintf(page, "%d\n", conf->max_nr_stripes);
4302 else 4302 else
@@ -4306,7 +4306,7 @@ raid5_show_stripe_cache_size(struct mddev *mddev, char *page)
4306int 4306int
4307raid5_set_cache_size(struct mddev *mddev, int size) 4307raid5_set_cache_size(struct mddev *mddev, int size)
4308{ 4308{
4309 raid5_conf_t *conf = mddev->private; 4309 struct r5conf *conf = mddev->private;
4310 int err; 4310 int err;
4311 4311
4312 if (size <= 16 || size > 32768) 4312 if (size <= 16 || size > 32768)
@@ -4332,7 +4332,7 @@ EXPORT_SYMBOL(raid5_set_cache_size);
4332static ssize_t 4332static ssize_t
4333raid5_store_stripe_cache_size(struct mddev *mddev, const char *page, size_t len) 4333raid5_store_stripe_cache_size(struct mddev *mddev, const char *page, size_t len)
4334{ 4334{
4335 raid5_conf_t *conf = mddev->private; 4335 struct r5conf *conf = mddev->private;
4336 unsigned long new; 4336 unsigned long new;
4337 int err; 4337 int err;
4338 4338
@@ -4357,7 +4357,7 @@ raid5_stripecache_size = __ATTR(stripe_cache_size, S_IRUGO | S_IWUSR,
4357static ssize_t 4357static ssize_t
4358raid5_show_preread_threshold(struct mddev *mddev, char *page) 4358raid5_show_preread_threshold(struct mddev *mddev, char *page)
4359{ 4359{
4360 raid5_conf_t *conf = mddev->private; 4360 struct r5conf *conf = mddev->private;
4361 if (conf) 4361 if (conf)
4362 return sprintf(page, "%d\n", conf->bypass_threshold); 4362 return sprintf(page, "%d\n", conf->bypass_threshold);
4363 else 4363 else
@@ -4367,7 +4367,7 @@ raid5_show_preread_threshold(struct mddev *mddev, char *page)
4367static ssize_t 4367static ssize_t
4368raid5_store_preread_threshold(struct mddev *mddev, const char *page, size_t len) 4368raid5_store_preread_threshold(struct mddev *mddev, const char *page, size_t len)
4369{ 4369{
4370 raid5_conf_t *conf = mddev->private; 4370 struct r5conf *conf = mddev->private;
4371 unsigned long new; 4371 unsigned long new;
4372 if (len >= PAGE_SIZE) 4372 if (len >= PAGE_SIZE)
4373 return -EINVAL; 4373 return -EINVAL;
@@ -4391,7 +4391,7 @@ raid5_preread_bypass_threshold = __ATTR(preread_bypass_threshold,
4391static ssize_t 4391static ssize_t
4392stripe_cache_active_show(struct mddev *mddev, char *page) 4392stripe_cache_active_show(struct mddev *mddev, char *page)
4393{ 4393{
4394 raid5_conf_t *conf = mddev->private; 4394 struct r5conf *conf = mddev->private;
4395 if (conf) 4395 if (conf)
4396 return sprintf(page, "%d\n", atomic_read(&conf->active_stripes)); 4396 return sprintf(page, "%d\n", atomic_read(&conf->active_stripes));
4397 else 4397 else
@@ -4415,7 +4415,7 @@ static struct attribute_group raid5_attrs_group = {
4415static sector_t 4415static sector_t
4416raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks) 4416raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks)
4417{ 4417{
4418 raid5_conf_t *conf = mddev->private; 4418 struct r5conf *conf = mddev->private;
4419 4419
4420 if (!sectors) 4420 if (!sectors)
4421 sectors = mddev->dev_sectors; 4421 sectors = mddev->dev_sectors;
@@ -4428,7 +4428,7 @@ raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks)
4428 return sectors * (raid_disks - conf->max_degraded); 4428 return sectors * (raid_disks - conf->max_degraded);
4429} 4429}
4430 4430
4431static void raid5_free_percpu(raid5_conf_t *conf) 4431static void raid5_free_percpu(struct r5conf *conf)
4432{ 4432{
4433 struct raid5_percpu *percpu; 4433 struct raid5_percpu *percpu;
4434 unsigned long cpu; 4434 unsigned long cpu;
@@ -4450,7 +4450,7 @@ static void raid5_free_percpu(raid5_conf_t *conf)
4450 free_percpu(conf->percpu); 4450 free_percpu(conf->percpu);
4451} 4451}
4452 4452
4453static void free_conf(raid5_conf_t *conf) 4453static void free_conf(struct r5conf *conf)
4454{ 4454{
4455 shrink_stripes(conf); 4455 shrink_stripes(conf);
4456 raid5_free_percpu(conf); 4456 raid5_free_percpu(conf);
@@ -4463,7 +4463,7 @@ static void free_conf(raid5_conf_t *conf)
4463static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action, 4463static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action,
4464 void *hcpu) 4464 void *hcpu)
4465{ 4465{
4466 raid5_conf_t *conf = container_of(nfb, raid5_conf_t, cpu_notify); 4466 struct r5conf *conf = container_of(nfb, struct r5conf, cpu_notify);
4467 long cpu = (long)hcpu; 4467 long cpu = (long)hcpu;
4468 struct raid5_percpu *percpu = per_cpu_ptr(conf->percpu, cpu); 4468 struct raid5_percpu *percpu = per_cpu_ptr(conf->percpu, cpu);
4469 4469
@@ -4498,7 +4498,7 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action,
4498} 4498}
4499#endif 4499#endif
4500 4500
4501static int raid5_alloc_percpu(raid5_conf_t *conf) 4501static int raid5_alloc_percpu(struct r5conf *conf)
4502{ 4502{
4503 unsigned long cpu; 4503 unsigned long cpu;
4504 struct page *spare_page; 4504 struct page *spare_page;
@@ -4540,9 +4540,9 @@ static int raid5_alloc_percpu(raid5_conf_t *conf)
4540 return err; 4540 return err;
4541} 4541}
4542 4542
4543static raid5_conf_t *setup_conf(struct mddev *mddev) 4543static struct r5conf *setup_conf(struct mddev *mddev)
4544{ 4544{
4545 raid5_conf_t *conf; 4545 struct r5conf *conf;
4546 int raid_disk, memory, max_disks; 4546 int raid_disk, memory, max_disks;
4547 struct md_rdev *rdev; 4547 struct md_rdev *rdev;
4548 struct disk_info *disk; 4548 struct disk_info *disk;
@@ -4576,7 +4576,7 @@ static raid5_conf_t *setup_conf(struct mddev *mddev)
4576 return ERR_PTR(-EINVAL); 4576 return ERR_PTR(-EINVAL);
4577 } 4577 }
4578 4578
4579 conf = kzalloc(sizeof(raid5_conf_t), GFP_KERNEL); 4579 conf = kzalloc(sizeof(struct r5conf), GFP_KERNEL);
4580 if (conf == NULL) 4580 if (conf == NULL)
4581 goto abort; 4581 goto abort;
4582 spin_lock_init(&conf->device_lock); 4582 spin_lock_init(&conf->device_lock);
@@ -4707,7 +4707,7 @@ static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded
4707 4707
4708static int run(struct mddev *mddev) 4708static int run(struct mddev *mddev)
4709{ 4709{
4710 raid5_conf_t *conf; 4710 struct r5conf *conf;
4711 int working_disks = 0; 4711 int working_disks = 0;
4712 int dirty_parity_disks = 0; 4712 int dirty_parity_disks = 0;
4713 struct md_rdev *rdev; 4713 struct md_rdev *rdev;
@@ -4944,7 +4944,7 @@ abort:
4944 4944
4945static int stop(struct mddev *mddev) 4945static int stop(struct mddev *mddev)
4946{ 4946{
4947 raid5_conf_t *conf = mddev->private; 4947 struct r5conf *conf = mddev->private;
4948 4948
4949 md_unregister_thread(&mddev->thread); 4949 md_unregister_thread(&mddev->thread);
4950 if (mddev->queue) 4950 if (mddev->queue)
@@ -4957,7 +4957,7 @@ static int stop(struct mddev *mddev)
4957 4957
4958static void status(struct seq_file *seq, struct mddev *mddev) 4958static void status(struct seq_file *seq, struct mddev *mddev)
4959{ 4959{
4960 raid5_conf_t *conf = mddev->private; 4960 struct r5conf *conf = mddev->private;
4961 int i; 4961 int i;
4962 4962
4963 seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level, 4963 seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level,
@@ -4970,7 +4970,7 @@ static void status(struct seq_file *seq, struct mddev *mddev)
4970 seq_printf (seq, "]"); 4970 seq_printf (seq, "]");
4971} 4971}
4972 4972
4973static void print_raid5_conf (raid5_conf_t *conf) 4973static void print_raid5_conf (struct r5conf *conf)
4974{ 4974{
4975 int i; 4975 int i;
4976 struct disk_info *tmp; 4976 struct disk_info *tmp;
@@ -4997,7 +4997,7 @@ static void print_raid5_conf (raid5_conf_t *conf)
4997static int raid5_spare_active(struct mddev *mddev) 4997static int raid5_spare_active(struct mddev *mddev)
4998{ 4998{
4999 int i; 4999 int i;
5000 raid5_conf_t *conf = mddev->private; 5000 struct r5conf *conf = mddev->private;
5001 struct disk_info *tmp; 5001 struct disk_info *tmp;
5002 int count = 0; 5002 int count = 0;
5003 unsigned long flags; 5003 unsigned long flags;
@@ -5021,7 +5021,7 @@ static int raid5_spare_active(struct mddev *mddev)
5021 5021
5022static int raid5_remove_disk(struct mddev *mddev, int number) 5022static int raid5_remove_disk(struct mddev *mddev, int number)
5023{ 5023{
5024 raid5_conf_t *conf = mddev->private; 5024 struct r5conf *conf = mddev->private;
5025 int err = 0; 5025 int err = 0;
5026 struct md_rdev *rdev; 5026 struct md_rdev *rdev;
5027 struct disk_info *p = conf->disks + number; 5027 struct disk_info *p = conf->disks + number;
@@ -5064,7 +5064,7 @@ abort:
5064 5064
5065static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev) 5065static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev)
5066{ 5066{
5067 raid5_conf_t *conf = mddev->private; 5067 struct r5conf *conf = mddev->private;
5068 int err = -EEXIST; 5068 int err = -EEXIST;
5069 int disk; 5069 int disk;
5070 struct disk_info *p; 5070 struct disk_info *p;
@@ -5142,7 +5142,7 @@ static int check_stripe_cache(struct mddev *mddev)
5142 * If the chunk size is greater, user-space should request more 5142 * If the chunk size is greater, user-space should request more
5143 * stripe_heads first. 5143 * stripe_heads first.
5144 */ 5144 */
5145 raid5_conf_t *conf = mddev->private; 5145 struct r5conf *conf = mddev->private;
5146 if (((mddev->chunk_sectors << 9) / STRIPE_SIZE) * 4 5146 if (((mddev->chunk_sectors << 9) / STRIPE_SIZE) * 4
5147 > conf->max_nr_stripes || 5147 > conf->max_nr_stripes ||
5148 ((mddev->new_chunk_sectors << 9) / STRIPE_SIZE) * 4 5148 ((mddev->new_chunk_sectors << 9) / STRIPE_SIZE) * 4
@@ -5158,7 +5158,7 @@ static int check_stripe_cache(struct mddev *mddev)
5158 5158
5159static int check_reshape(struct mddev *mddev) 5159static int check_reshape(struct mddev *mddev)
5160{ 5160{
5161 raid5_conf_t *conf = mddev->private; 5161 struct r5conf *conf = mddev->private;
5162 5162
5163 if (mddev->delta_disks == 0 && 5163 if (mddev->delta_disks == 0 &&
5164 mddev->new_layout == mddev->layout && 5164 mddev->new_layout == mddev->layout &&
@@ -5190,7 +5190,7 @@ static int check_reshape(struct mddev *mddev)
5190 5190
5191static int raid5_start_reshape(struct mddev *mddev) 5191static int raid5_start_reshape(struct mddev *mddev)
5192{ 5192{
5193 raid5_conf_t *conf = mddev->private; 5193 struct r5conf *conf = mddev->private;
5194 struct md_rdev *rdev; 5194 struct md_rdev *rdev;
5195 int spares = 0; 5195 int spares = 0;
5196 unsigned long flags; 5196 unsigned long flags;
@@ -5305,7 +5305,7 @@ static int raid5_start_reshape(struct mddev *mddev)
5305/* This is called from the reshape thread and should make any 5305/* This is called from the reshape thread and should make any
5306 * changes needed in 'conf' 5306 * changes needed in 'conf'
5307 */ 5307 */
5308static void end_reshape(raid5_conf_t *conf) 5308static void end_reshape(struct r5conf *conf)
5309{ 5309{
5310 5310
5311 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { 5311 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) {
@@ -5334,7 +5334,7 @@ static void end_reshape(raid5_conf_t *conf)
5334 */ 5334 */
5335static void raid5_finish_reshape(struct mddev *mddev) 5335static void raid5_finish_reshape(struct mddev *mddev)
5336{ 5336{
5337 raid5_conf_t *conf = mddev->private; 5337 struct r5conf *conf = mddev->private;
5338 5338
5339 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { 5339 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
5340 5340
@@ -5369,7 +5369,7 @@ static void raid5_finish_reshape(struct mddev *mddev)
5369 5369
5370static void raid5_quiesce(struct mddev *mddev, int state) 5370static void raid5_quiesce(struct mddev *mddev, int state)
5371{ 5371{
5372 raid5_conf_t *conf = mddev->private; 5372 struct r5conf *conf = mddev->private;
5373 5373
5374 switch(state) { 5374 switch(state) {
5375 case 2: /* resume for a suspend */ 5375 case 2: /* resume for a suspend */
@@ -5498,7 +5498,7 @@ static int raid5_check_reshape(struct mddev *mddev)
5498 * For larger arrays we record the new value - after validation 5498 * For larger arrays we record the new value - after validation
5499 * to be used by a reshape pass. 5499 * to be used by a reshape pass.
5500 */ 5500 */
5501 raid5_conf_t *conf = mddev->private; 5501 struct r5conf *conf = mddev->private;
5502 int new_chunk = mddev->new_chunk_sectors; 5502 int new_chunk = mddev->new_chunk_sectors;
5503 5503
5504 if (mddev->new_layout >= 0 && !algorithm_valid_raid5(mddev->new_layout)) 5504 if (mddev->new_layout >= 0 && !algorithm_valid_raid5(mddev->new_layout))
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index cf4702ccf73a..e10c5531f9c5 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -197,7 +197,7 @@ enum reconstruct_states {
197struct stripe_head { 197struct stripe_head {
198 struct hlist_node hash; 198 struct hlist_node hash;
199 struct list_head lru; /* inactive_list or handle_list */ 199 struct list_head lru; /* inactive_list or handle_list */
200 struct raid5_private_data *raid_conf; 200 struct r5conf *raid_conf;
201 short generation; /* increments with every 201 short generation; /* increments with every
202 * reshape */ 202 * reshape */
203 sector_t sector; /* sector of this row */ 203 sector_t sector; /* sector of this row */
@@ -347,7 +347,7 @@ struct disk_info {
347 struct md_rdev *rdev; 347 struct md_rdev *rdev;
348}; 348};
349 349
350struct raid5_private_data { 350struct r5conf {
351 struct hlist_head *stripe_hashtbl; 351 struct hlist_head *stripe_hashtbl;
352 struct mddev *mddev; 352 struct mddev *mddev;
353 struct disk_info *spare; 353 struct disk_info *spare;
@@ -439,8 +439,6 @@ struct raid5_private_data {
439 struct md_thread *thread; 439 struct md_thread *thread;
440}; 440};
441 441
442typedef struct raid5_private_data raid5_conf_t;
443
444/* 442/*
445 * Our supported algorithms 443 * Our supported algorithms
446 */ 444 */
@@ -504,6 +502,6 @@ static inline int algorithm_is_DDF(int layout)
504} 502}
505 503
506extern int md_raid5_congested(struct mddev *mddev, int bits); 504extern int md_raid5_congested(struct mddev *mddev, int bits);
507extern void md_raid5_kick_device(raid5_conf_t *conf); 505extern void md_raid5_kick_device(struct r5conf *conf);
508extern int raid5_set_cache_size(struct mddev *mddev, int size); 506extern int raid5_set_cache_size(struct mddev *mddev, int size);
509#endif 507#endif