Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38115
b: refs/heads/master
c: 76186dd
h: refs/heads/master
i:
  38113: 48b97cf
  38111: 94a77fe
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Oct 3, 2006
1 parent 3cc45d3 commit f5b6534
Show file tree
Hide file tree
Showing 3 changed files with 5 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: 02c2de8cc835885bdff51a8bfd6c0b659b969f50
refs/heads/master: 76186dd8b73d2b7b9b4c8629b89c845e97009801
12 changes: 4 additions & 8 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ static void status(struct seq_file *seq, mddev_t *mddev)
seq_printf(seq, " %d far-copies", conf->far_copies);
}
seq_printf(seq, " [%d/%d] [", conf->raid_disks,
conf->working_disks);
conf->raid_disks - mddev->degraded);
for (i = 0; i < conf->raid_disks; i++)
seq_printf(seq, "%s",
conf->mirrors[i].rdev &&
Expand All @@ -941,7 +941,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
* else mark the drive as failed
*/
if (test_bit(In_sync, &rdev->flags)
&& conf->working_disks == 1)
&& conf->raid_disks-mddev->degraded == 1)
/*
* Don't fail the drive, just return an IO error.
* The test should really be more sophisticated than
Expand All @@ -952,7 +952,6 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
return;
if (test_bit(In_sync, &rdev->flags)) {
mddev->degraded++;
conf->working_disks--;
/*
* if recovery is running, make sure it aborts.
*/
Expand All @@ -963,7 +962,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
set_bit(MD_CHANGE_DEVS, &mddev->flags);
printk(KERN_ALERT "raid10: Disk failure on %s, disabling device. \n"
" Operation continuing on %d devices\n",
bdevname(rdev->bdev,b), conf->working_disks);
bdevname(rdev->bdev,b), conf->raid_disks - mddev->degraded);
}

static void print_conf(conf_t *conf)
Expand All @@ -976,7 +975,7 @@ static void print_conf(conf_t *conf)
printk("(!conf)\n");
return;
}
printk(" --- wd:%d rd:%d\n", conf->working_disks,
printk(" --- wd:%d rd:%d\n", conf->raid_disks - conf->mddev->degraded,
conf->raid_disks);

for (i = 0; i < conf->raid_disks; i++) {
Expand Down Expand Up @@ -1035,7 +1034,6 @@ static int raid10_spare_active(mddev_t *mddev)
if (tmp->rdev
&& !test_bit(Faulty, &tmp->rdev->flags)
&& !test_bit(In_sync, &tmp->rdev->flags)) {
conf->working_disks++;
mddev->degraded--;
set_bit(In_sync, &tmp->rdev->flags);
}
Expand Down Expand Up @@ -2035,8 +2033,6 @@ static int run(mddev_t *mddev)
mddev->queue->max_sectors = (PAGE_SIZE>>9);

disk->head_position = 0;
if (!test_bit(Faulty, &rdev->flags) && test_bit(In_sync, &rdev->flags))
conf->working_disks++;
}
conf->raid_disks = mddev->raid_disks;
conf->mddev = mddev;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/raid/raid10.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct r10_private_data_s {
mddev_t *mddev;
mirror_info_t *mirrors;
int raid_disks;
int working_disks;
spinlock_t device_lock;

/* geometry */
Expand Down

0 comments on commit f5b6534

Please sign in to comment.