aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2012-07-30 20:03:52 -0400
committerNeilBrown <neilb@suse.de>2012-07-30 20:03:52 -0400
commit0eaf822cb3dfcf2a64b2d27f4f6219186adb2695 (patch)
tree9ff680dca1ecb054793f90df472cedd63d32498d /drivers
parentdc280d987f039ef35ac1e59c09b7154b61f385cf (diff)
MD RAID1: rename mirror_info structure
MD RAID1: Rename the structure 'mirror_info' to 'raid1_info' The same structure name ('mirror_info') is used by raid10. Each of these structures are defined in there respective header files. If dm-raid is to support both RAID1 and RAID10, the header files will be included and the structure names must not collide. While only one of these structure names needs to change, this patch adds consistency to the naming of the structure. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/raid1.c14
-rw-r--r--drivers/md/raid1.h4
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index cacd008d686..57d6abd497e 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -873,7 +873,7 @@ do_sync_io:
873static void make_request(struct mddev *mddev, struct bio * bio) 873static void make_request(struct mddev *mddev, struct bio * bio)
874{ 874{
875 struct r1conf *conf = mddev->private; 875 struct r1conf *conf = mddev->private;
876 struct mirror_info *mirror; 876 struct raid1_info *mirror;
877 struct r1bio *r1_bio; 877 struct r1bio *r1_bio;
878 struct bio *read_bio; 878 struct bio *read_bio;
879 int i, disks; 879 int i, disks;
@@ -1364,7 +1364,7 @@ static int raid1_add_disk(struct mddev *mddev, struct md_rdev *rdev)
1364 struct r1conf *conf = mddev->private; 1364 struct r1conf *conf = mddev->private;
1365 int err = -EEXIST; 1365 int err = -EEXIST;
1366 int mirror = 0; 1366 int mirror = 0;
1367 struct mirror_info *p; 1367 struct raid1_info *p;
1368 int first = 0; 1368 int first = 0;
1369 int last = conf->raid_disks - 1; 1369 int last = conf->raid_disks - 1;
1370 struct request_queue *q = bdev_get_queue(rdev->bdev); 1370 struct request_queue *q = bdev_get_queue(rdev->bdev);
@@ -1433,7 +1433,7 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
1433 struct r1conf *conf = mddev->private; 1433 struct r1conf *conf = mddev->private;
1434 int err = 0; 1434 int err = 0;
1435 int number = rdev->raid_disk; 1435 int number = rdev->raid_disk;
1436 struct mirror_info *p = conf->mirrors+ number; 1436 struct raid1_info *p = conf->mirrors + number;
1437 1437
1438 if (rdev != p->rdev) 1438 if (rdev != p->rdev)
1439 p = conf->mirrors + conf->raid_disks + number; 1439 p = conf->mirrors + conf->raid_disks + number;
@@ -2521,7 +2521,7 @@ static struct r1conf *setup_conf(struct mddev *mddev)
2521{ 2521{
2522 struct r1conf *conf; 2522 struct r1conf *conf;
2523 int i; 2523 int i;
2524 struct mirror_info *disk; 2524 struct raid1_info *disk;
2525 struct md_rdev *rdev; 2525 struct md_rdev *rdev;
2526 int err = -ENOMEM; 2526 int err = -ENOMEM;
2527 2527
@@ -2529,7 +2529,7 @@ static struct r1conf *setup_conf(struct mddev *mddev)
2529 if (!conf) 2529 if (!conf)
2530 goto abort; 2530 goto abort;
2531 2531
2532 conf->mirrors = kzalloc(sizeof(struct mirror_info) 2532 conf->mirrors = kzalloc(sizeof(struct raid1_info)
2533 * mddev->raid_disks * 2, 2533 * mddev->raid_disks * 2,
2534 GFP_KERNEL); 2534 GFP_KERNEL);
2535 if (!conf->mirrors) 2535 if (!conf->mirrors)
@@ -2798,7 +2798,7 @@ static int raid1_reshape(struct mddev *mddev)
2798 */ 2798 */
2799 mempool_t *newpool, *oldpool; 2799 mempool_t *newpool, *oldpool;
2800 struct pool_info *newpoolinfo; 2800 struct pool_info *newpoolinfo;
2801 struct mirror_info *newmirrors; 2801 struct raid1_info *newmirrors;
2802 struct r1conf *conf = mddev->private; 2802 struct r1conf *conf = mddev->private;
2803 int cnt, raid_disks; 2803 int cnt, raid_disks;
2804 unsigned long flags; 2804 unsigned long flags;
@@ -2841,7 +2841,7 @@ static int raid1_reshape(struct mddev *mddev)
2841 kfree(newpoolinfo); 2841 kfree(newpoolinfo);
2842 return -ENOMEM; 2842 return -ENOMEM;
2843 } 2843 }
2844 newmirrors = kzalloc(sizeof(struct mirror_info) * raid_disks * 2, 2844 newmirrors = kzalloc(sizeof(struct raid1_info) * raid_disks * 2,
2845 GFP_KERNEL); 2845 GFP_KERNEL);
2846 if (!newmirrors) { 2846 if (!newmirrors) {
2847 kfree(newpoolinfo); 2847 kfree(newpoolinfo);
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h
index 80ded139314..6b49336575f 100644
--- a/drivers/md/raid1.h
+++ b/drivers/md/raid1.h
@@ -1,7 +1,7 @@
1#ifndef _RAID1_H 1#ifndef _RAID1_H
2#define _RAID1_H 2#define _RAID1_H
3 3
4struct mirror_info { 4struct raid1_info {
5 struct md_rdev *rdev; 5 struct md_rdev *rdev;
6 sector_t head_position; 6 sector_t head_position;
7}; 7};
@@ -24,7 +24,7 @@ struct pool_info {
24 24
25struct r1conf { 25struct r1conf {
26 struct mddev *mddev; 26 struct mddev *mddev;
27 struct mirror_info *mirrors; /* twice 'raid_disks' to 27 struct raid1_info *mirrors; /* twice 'raid_disks' to
28 * allow for replacements. 28 * allow for replacements.
29 */ 29 */
30 int raid_disks; 30 int raid_disks;