diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 90f5b24f6e6c..c605ba805586 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -57,7 +57,6 @@ static int create_strip_zones (mddev_t *mddev) | |||
57 | sector_t min_spacing; | 57 | sector_t min_spacing; |
58 | raid0_conf_t *conf = mddev_to_conf(mddev); | 58 | raid0_conf_t *conf = mddev_to_conf(mddev); |
59 | mdk_rdev_t *smallest, *rdev1, *rdev2, *rdev; | 59 | mdk_rdev_t *smallest, *rdev1, *rdev2, *rdev; |
60 | struct list_head *tmp1, *tmp2; | ||
61 | struct strip_zone *zone; | 60 | struct strip_zone *zone; |
62 | int cnt; | 61 | int cnt; |
63 | char b[BDEVNAME_SIZE]; | 62 | char b[BDEVNAME_SIZE]; |
@@ -67,11 +66,11 @@ static int create_strip_zones (mddev_t *mddev) | |||
67 | */ | 66 | */ |
68 | conf->nr_strip_zones = 0; | 67 | conf->nr_strip_zones = 0; |
69 | 68 | ||
70 | rdev_for_each(rdev1, tmp1, mddev) { | 69 | list_for_each_entry(rdev1, &mddev->disks, same_set) { |
71 | printk(KERN_INFO "raid0: looking at %s\n", | 70 | printk(KERN_INFO "raid0: looking at %s\n", |
72 | bdevname(rdev1->bdev,b)); | 71 | bdevname(rdev1->bdev,b)); |
73 | c = 0; | 72 | c = 0; |
74 | rdev_for_each(rdev2, tmp2, mddev) { | 73 | list_for_each_entry(rdev2, &mddev->disks, same_set) { |
75 | printk(KERN_INFO "raid0: comparing %s(%llu)", | 74 | printk(KERN_INFO "raid0: comparing %s(%llu)", |
76 | bdevname(rdev1->bdev,b), | 75 | bdevname(rdev1->bdev,b), |
77 | (unsigned long long)rdev1->size); | 76 | (unsigned long long)rdev1->size); |
@@ -120,7 +119,7 @@ static int create_strip_zones (mddev_t *mddev) | |||
120 | cnt = 0; | 119 | cnt = 0; |
121 | smallest = NULL; | 120 | smallest = NULL; |
122 | zone->dev = conf->devlist; | 121 | zone->dev = conf->devlist; |
123 | rdev_for_each(rdev1, tmp1, mddev) { | 122 | list_for_each_entry(rdev1, &mddev->disks, same_set) { |
124 | int j = rdev1->raid_disk; | 123 | int j = rdev1->raid_disk; |
125 | 124 | ||
126 | if (j < 0 || j >= mddev->raid_disks) { | 125 | if (j < 0 || j >= mddev->raid_disks) { |
@@ -268,7 +267,6 @@ static int raid0_run (mddev_t *mddev) | |||
268 | s64 sectors; | 267 | s64 sectors; |
269 | raid0_conf_t *conf; | 268 | raid0_conf_t *conf; |
270 | mdk_rdev_t *rdev; | 269 | mdk_rdev_t *rdev; |
271 | struct list_head *tmp; | ||
272 | 270 | ||
273 | if (mddev->chunk_size == 0) { | 271 | if (mddev->chunk_size == 0) { |
274 | printk(KERN_ERR "md/raid0: non-zero chunk size required.\n"); | 272 | printk(KERN_ERR "md/raid0: non-zero chunk size required.\n"); |
@@ -294,7 +292,7 @@ static int raid0_run (mddev_t *mddev) | |||
294 | 292 | ||
295 | /* calculate array device size */ | 293 | /* calculate array device size */ |
296 | mddev->array_sectors = 0; | 294 | mddev->array_sectors = 0; |
297 | rdev_for_each(rdev, tmp, mddev) | 295 | list_for_each_entry(rdev, &mddev->disks, same_set) |
298 | mddev->array_sectors += rdev->size * 2; | 296 | mddev->array_sectors += rdev->size * 2; |
299 | 297 | ||
300 | printk(KERN_INFO "raid0 : md_size is %llu sectors.\n", | 298 | printk(KERN_INFO "raid0 : md_size is %llu sectors.\n", |