Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320895
b: refs/heads/master
c: 0eaf822
h: refs/heads/master
i:
  320893: 18ad450
  320891: 5d669cc
  320887: ac1670f
  320879: 0cacae9
  320863: 3595909
  320831: c7b10f0
  320767: 3d65167
v: v3
  • Loading branch information
Jonathan Brassow authored and NeilBrown committed Jul 31, 2012
1 parent a7b14c4 commit d0c9961
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc280d987f039ef35ac1e59c09b7154b61f385cf
refs/heads/master: 0eaf822cb3dfcf2a64b2d27f4f6219186adb2695
14 changes: 7 additions & 7 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ static void alloc_behind_pages(struct bio *bio, struct r1bio *r1_bio)
static void make_request(struct mddev *mddev, struct bio * bio)
{
struct r1conf *conf = mddev->private;
struct mirror_info *mirror;
struct raid1_info *mirror;
struct r1bio *r1_bio;
struct bio *read_bio;
int i, disks;
Expand Down Expand Up @@ -1364,7 +1364,7 @@ static int raid1_add_disk(struct mddev *mddev, struct md_rdev *rdev)
struct r1conf *conf = mddev->private;
int err = -EEXIST;
int mirror = 0;
struct mirror_info *p;
struct raid1_info *p;
int first = 0;
int last = conf->raid_disks - 1;
struct request_queue *q = bdev_get_queue(rdev->bdev);
Expand Down Expand Up @@ -1433,7 +1433,7 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
struct r1conf *conf = mddev->private;
int err = 0;
int number = rdev->raid_disk;
struct mirror_info *p = conf->mirrors+ number;
struct raid1_info *p = conf->mirrors + number;

if (rdev != p->rdev)
p = conf->mirrors + conf->raid_disks + number;
Expand Down Expand Up @@ -2521,15 +2521,15 @@ static struct r1conf *setup_conf(struct mddev *mddev)
{
struct r1conf *conf;
int i;
struct mirror_info *disk;
struct raid1_info *disk;
struct md_rdev *rdev;
int err = -ENOMEM;

conf = kzalloc(sizeof(struct r1conf), GFP_KERNEL);
if (!conf)
goto abort;

conf->mirrors = kzalloc(sizeof(struct mirror_info)
conf->mirrors = kzalloc(sizeof(struct raid1_info)
* mddev->raid_disks * 2,
GFP_KERNEL);
if (!conf->mirrors)
Expand Down Expand Up @@ -2798,7 +2798,7 @@ static int raid1_reshape(struct mddev *mddev)
*/
mempool_t *newpool, *oldpool;
struct pool_info *newpoolinfo;
struct mirror_info *newmirrors;
struct raid1_info *newmirrors;
struct r1conf *conf = mddev->private;
int cnt, raid_disks;
unsigned long flags;
Expand Down Expand Up @@ -2841,7 +2841,7 @@ static int raid1_reshape(struct mddev *mddev)
kfree(newpoolinfo);
return -ENOMEM;
}
newmirrors = kzalloc(sizeof(struct mirror_info) * raid_disks * 2,
newmirrors = kzalloc(sizeof(struct raid1_info) * raid_disks * 2,
GFP_KERNEL);
if (!newmirrors) {
kfree(newpoolinfo);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/md/raid1.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _RAID1_H
#define _RAID1_H

struct mirror_info {
struct raid1_info {
struct md_rdev *rdev;
sector_t head_position;
};
Expand All @@ -24,7 +24,7 @@ struct pool_info {

struct r1conf {
struct mddev *mddev;
struct mirror_info *mirrors; /* twice 'raid_disks' to
struct raid1_info *mirrors; /* twice 'raid_disks' to
* allow for replacements.
*/
int raid_disks;
Expand Down

0 comments on commit d0c9961

Please sign in to comment.