Skip to content

Commit

Permalink
DM RAID: Use md_error() in place of simply setting Faulty bit
Browse files Browse the repository at this point in the history
When encountering an error while reading the superblock, call md_error.

We are currently setting the 'Faulty' bit on one of the array devices when an
error is encountered while reading the superblock of a dm-raid array.  We should
be calling md_error(), as it handles the error more completely.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
Jonathan Brassow authored and NeilBrown committed May 22, 2012
1 parent 81f382f commit c32fb9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static int read_disk_sb(struct md_rdev *rdev, int size)
if (!sync_page_io(rdev, 0, size, rdev->sb_page, READ, 1)) {
DMERR("Failed to read superblock of device at position %d",
rdev->raid_disk);
set_bit(Faulty, &rdev->flags);
md_error(rdev->mddev, rdev);
return -EINVAL;
}

Expand Down

0 comments on commit c32fb9e

Please sign in to comment.