Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320894
b: refs/heads/master
c: dc280d9
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Brassow authored and NeilBrown committed Jul 31, 2012
1 parent 18ad450 commit a7b14c4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 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: 3bbae04b126fbd4c191b4167ea46ba9c4da46425
refs/heads/master: dc280d987f039ef35ac1e59c09b7154b61f385cf
18 changes: 9 additions & 9 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ static void error(struct mddev *mddev, struct md_rdev *rdev)
static void print_conf(struct r10conf *conf)
{
int i;
struct mirror_info *tmp;
struct raid10_info *tmp;

printk(KERN_DEBUG "RAID10 conf printout:\n");
if (!conf) {
Expand Down Expand Up @@ -1580,7 +1580,7 @@ static int raid10_spare_active(struct mddev *mddev)
{
int i;
struct r10conf *conf = mddev->private;
struct mirror_info *tmp;
struct raid10_info *tmp;
int count = 0;
unsigned long flags;

Expand Down Expand Up @@ -1655,7 +1655,7 @@ static int raid10_add_disk(struct mddev *mddev, struct md_rdev *rdev)
else
mirror = first;
for ( ; mirror <= last ; mirror++) {
struct mirror_info *p = &conf->mirrors[mirror];
struct raid10_info *p = &conf->mirrors[mirror];
if (p->recovery_disabled == mddev->recovery_disabled)
continue;
if (p->rdev) {
Expand Down Expand Up @@ -1709,7 +1709,7 @@ static int raid10_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
int err = 0;
int number = rdev->raid_disk;
struct md_rdev **rdevp;
struct mirror_info *p = conf->mirrors + number;
struct raid10_info *p = conf->mirrors + number;

print_conf(conf);
if (rdev == p->rdev)
Expand Down Expand Up @@ -2876,7 +2876,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
sector_t sect;
int must_sync;
int any_working;
struct mirror_info *mirror = &conf->mirrors[i];
struct raid10_info *mirror = &conf->mirrors[i];

if ((mirror->rdev == NULL ||
test_bit(In_sync, &mirror->rdev->flags))
Expand Down Expand Up @@ -3388,7 +3388,7 @@ static struct r10conf *setup_conf(struct mddev *mddev)
goto out;

/* FIXME calc properly */
conf->mirrors = kzalloc(sizeof(struct mirror_info)*(mddev->raid_disks +
conf->mirrors = kzalloc(sizeof(struct raid10_info)*(mddev->raid_disks +
max(0,mddev->delta_disks)),
GFP_KERNEL);
if (!conf->mirrors)
Expand Down Expand Up @@ -3452,7 +3452,7 @@ static int run(struct mddev *mddev)
{
struct r10conf *conf;
int i, disk_idx, chunk_size;
struct mirror_info *disk;
struct raid10_info *disk;
struct md_rdev *rdev;
sector_t size;
sector_t min_offset_diff = 0;
Expand Down Expand Up @@ -3805,7 +3805,7 @@ static int raid10_check_reshape(struct mddev *mddev)
if (mddev->delta_disks > 0) {
/* allocate new 'mirrors' list */
conf->mirrors_new = kzalloc(
sizeof(struct mirror_info)
sizeof(struct raid10_info)
*(mddev->raid_disks +
mddev->delta_disks),
GFP_KERNEL);
Expand Down Expand Up @@ -3930,7 +3930,7 @@ static int raid10_start_reshape(struct mddev *mddev)
spin_lock_irq(&conf->device_lock);
if (conf->mirrors_new) {
memcpy(conf->mirrors_new, conf->mirrors,
sizeof(struct mirror_info)*conf->prev.raid_disks);
sizeof(struct raid10_info)*conf->prev.raid_disks);
smp_mb();
kfree(conf->mirrors_old); /* FIXME and elsewhere */
conf->mirrors_old = conf->mirrors;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/md/raid10.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _RAID10_H
#define _RAID10_H

struct mirror_info {
struct raid10_info {
struct md_rdev *rdev, *replacement;
sector_t head_position;
int recovery_disabled; /* matches
Expand All @@ -13,8 +13,8 @@ struct mirror_info {

struct r10conf {
struct mddev *mddev;
struct mirror_info *mirrors;
struct mirror_info *mirrors_new, *mirrors_old;
struct raid10_info *mirrors;
struct raid10_info *mirrors_new, *mirrors_old;
spinlock_t device_lock;

/* geometry */
Expand Down

0 comments on commit a7b14c4

Please sign in to comment.