Skip to content

Commit

Permalink
md: fix bug in raid10 recovery.
Browse files Browse the repository at this point in the history
Adding a spare to a raid10 doesn't cause recovery to start.
This is due to an silly type in
  commit 6c2fce2
and so is a bug in 2.6.27 and .28-rc.

Thanks to Thomas Backlund for bisecting to find this.

Cc: Thomas Backlund <tmb@mandriva.org>
Cc: stable@kernel.org

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Nov 6, 2008
1 parent cb3ac42 commit a53a6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
if (!enough(conf))
return -EINVAL;

if (rdev->raid_disk)
if (rdev->raid_disk >= 0)
first = last = rdev->raid_disk;

if (rdev->saved_raid_disk >= 0 &&
Expand Down

0 comments on commit a53a6c8

Please sign in to comment.