aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index db51e6f68191..38a9012ff4fe 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -28,7 +28,7 @@
28static int raid0_congested(void *data, int bits) 28static int raid0_congested(void *data, int bits)
29{ 29{
30 struct mddev *mddev = data; 30 struct mddev *mddev = data;
31 raid0_conf_t *conf = mddev->private; 31 struct r0conf *conf = mddev->private;
32 struct md_rdev **devlist = conf->devlist; 32 struct md_rdev **devlist = conf->devlist;
33 int raid_disks = conf->strip_zone[0].nb_dev; 33 int raid_disks = conf->strip_zone[0].nb_dev;
34 int i, ret = 0; 34 int i, ret = 0;
@@ -53,7 +53,7 @@ static void dump_zones(struct mddev *mddev)
53 sector_t zone_size = 0; 53 sector_t zone_size = 0;
54 sector_t zone_start = 0; 54 sector_t zone_start = 0;
55 char b[BDEVNAME_SIZE]; 55 char b[BDEVNAME_SIZE];
56 raid0_conf_t *conf = mddev->private; 56 struct r0conf *conf = mddev->private;
57 int raid_disks = conf->strip_zone[0].nb_dev; 57 int raid_disks = conf->strip_zone[0].nb_dev;
58 printk(KERN_INFO "md: RAID0 configuration for %s - %d zone%s\n", 58 printk(KERN_INFO "md: RAID0 configuration for %s - %d zone%s\n",
59 mdname(mddev), 59 mdname(mddev),
@@ -77,7 +77,7 @@ static void dump_zones(struct mddev *mddev)
77 printk(KERN_INFO "\n"); 77 printk(KERN_INFO "\n");
78} 78}
79 79
80static int create_strip_zones(struct mddev *mddev, raid0_conf_t **private_conf) 80static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
81{ 81{
82 int i, c, err; 82 int i, c, err;
83 sector_t curr_zone_end, sectors; 83 sector_t curr_zone_end, sectors;
@@ -86,7 +86,7 @@ static int create_strip_zones(struct mddev *mddev, raid0_conf_t **private_conf)
86 int cnt; 86 int cnt;
87 char b[BDEVNAME_SIZE]; 87 char b[BDEVNAME_SIZE];
88 char b2[BDEVNAME_SIZE]; 88 char b2[BDEVNAME_SIZE];
89 raid0_conf_t *conf = kzalloc(sizeof(*conf), GFP_KERNEL); 89 struct r0conf *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
90 90
91 if (!conf) 91 if (!conf)
92 return -ENOMEM; 92 return -ENOMEM;
@@ -336,7 +336,7 @@ static sector_t raid0_size(struct mddev *mddev, sector_t sectors, int raid_disks
336 336
337static int raid0_run(struct mddev *mddev) 337static int raid0_run(struct mddev *mddev)
338{ 338{
339 raid0_conf_t *conf; 339 struct r0conf *conf;
340 int ret; 340 int ret;
341 341
342 if (mddev->chunk_sectors == 0) { 342 if (mddev->chunk_sectors == 0) {
@@ -386,7 +386,7 @@ static int raid0_run(struct mddev *mddev)
386 386
387static int raid0_stop(struct mddev *mddev) 387static int raid0_stop(struct mddev *mddev)
388{ 388{
389 raid0_conf_t *conf = mddev->private; 389 struct r0conf *conf = mddev->private;
390 390
391 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ 391 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
392 kfree(conf->strip_zone); 392 kfree(conf->strip_zone);
@@ -399,7 +399,7 @@ static int raid0_stop(struct mddev *mddev)
399/* Find the zone which holds a particular offset 399/* Find the zone which holds a particular offset
400 * Update *sectorp to be an offset in that zone 400 * Update *sectorp to be an offset in that zone
401 */ 401 */
402static struct strip_zone *find_zone(struct raid0_private_data *conf, 402static struct strip_zone *find_zone(struct r0conf *conf,
403 sector_t *sectorp) 403 sector_t *sectorp)
404{ 404{
405 int i; 405 int i;
@@ -424,7 +424,7 @@ static struct md_rdev *map_sector(struct mddev *mddev, struct strip_zone *zone,
424{ 424{
425 unsigned int sect_in_chunk; 425 unsigned int sect_in_chunk;
426 sector_t chunk; 426 sector_t chunk;
427 raid0_conf_t *conf = mddev->private; 427 struct r0conf *conf = mddev->private;
428 int raid_disks = conf->strip_zone[0].nb_dev; 428 int raid_disks = conf->strip_zone[0].nb_dev;
429 unsigned int chunk_sects = mddev->chunk_sectors; 429 unsigned int chunk_sects = mddev->chunk_sectors;
430 430
@@ -537,7 +537,7 @@ static void raid0_status(struct seq_file *seq, struct mddev *mddev)
537static void *raid0_takeover_raid45(struct mddev *mddev) 537static void *raid0_takeover_raid45(struct mddev *mddev)
538{ 538{
539 struct md_rdev *rdev; 539 struct md_rdev *rdev;
540 raid0_conf_t *priv_conf; 540 struct r0conf *priv_conf;
541 541
542 if (mddev->degraded != 1) { 542 if (mddev->degraded != 1) {
543 printk(KERN_ERR "md/raid0:%s: raid5 must be degraded! Degraded disks: %d\n", 543 printk(KERN_ERR "md/raid0:%s: raid5 must be degraded! Degraded disks: %d\n",
@@ -570,7 +570,7 @@ static void *raid0_takeover_raid45(struct mddev *mddev)
570 570
571static void *raid0_takeover_raid10(struct mddev *mddev) 571static void *raid0_takeover_raid10(struct mddev *mddev)
572{ 572{
573 raid0_conf_t *priv_conf; 573 struct r0conf *priv_conf;
574 574
575 /* Check layout: 575 /* Check layout:
576 * - far_copies must be 1 576 * - far_copies must be 1
@@ -611,7 +611,7 @@ static void *raid0_takeover_raid10(struct mddev *mddev)
611 611
612static void *raid0_takeover_raid1(struct mddev *mddev) 612static void *raid0_takeover_raid1(struct mddev *mddev)
613{ 613{
614 raid0_conf_t *priv_conf; 614 struct r0conf *priv_conf;
615 615
616 /* Check layout: 616 /* Check layout:
617 * - (N - 1) mirror drives must be already faulty 617 * - (N - 1) mirror drives must be already faulty