Commit bbc58779 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: Fix assort typos in most recent MD patches..

1/ Raid0 should not be accessing rdev->sb.

2/ Don't unlock rdev (which releases bdev) until after last use of bdev

3/ Fix typo in a printk ( = should be -)

4/ i should be dd_idx in compute_block
parent f62c4935
......@@ -594,10 +594,10 @@ static void export_rdev(mdk_rdev_t * rdev)
MD_BUG();
free_disk_sb(rdev);
list_del_init(&rdev->same_set);
unlock_rdev(rdev);
#ifndef MODULE
md_autodetect_dev(rdev->bdev->bd_dev);
#endif
unlock_rdev(rdev);
rdev->faulty = 0;
kfree(rdev);
}
......
......@@ -87,7 +87,7 @@ static int create_strip_zones (mddev_t *mddev)
cnt = 0;
smallest = NULL;
ITERATE_RDEV(mddev, rdev1, tmp1) {
int j = rdev1->sb->this_disk.raid_disk;
int j = rdev1->raid_disk;
if (j < 0 || j >= mddev->raid_disks) {
printk("raid0: bad disk number %d - aborting!\n", j);
......
......@@ -681,7 +681,7 @@ static void compute_block(struct stripe_head *sh, int dd_idx)
}
if (count != 1)
xor_block(count, STRIPE_SIZE, ptr);
set_bit(R5_UPTODATE, &sh->dev[i].flags);
set_bit(R5_UPTODATE, &sh->dev[dd_idx].flags);
}
static void compute_parity(struct stripe_head *sh, int method)
......@@ -1519,7 +1519,7 @@ static int run (mddev_t *mddev)
mddev->raid_disks-mddev->degraded, mddev->raid_disks, conf->algorithm);
else
printk(KERN_ALERT "raid5: raid level %d set md%d active with %d out of %d devices, algorithm %d\n", conf->level, mdidx(mddev),
mddev->raid_disks = mddev->degraded, mddev->raid_disks, conf->algorithm);
mddev->raid_disks - mddev->degraded, mddev->raid_disks, conf->algorithm);
print_raid5_conf(conf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment