geom_raid (RAID5): do not lose bp->bio_error, keep it in pbp->bio_error

and return it by passing to g_raid_iodone()

Approved by:	mav (mentor)
MFC after:	3 days
This commit is contained in:
eugen 2017-12-07 20:09:17 +00:00
parent 1f9b8d0bcc
commit 748192b1b0

View File

@ -373,15 +373,15 @@ g_raid_tr_iodone_raid5(struct g_raid_tr_object *tr,
struct g_raid_subdisk *sd, struct bio *bp)
{
struct bio *pbp;
int error;
pbp = bp->bio_parent;
if (pbp->bio_error == 0)
pbp->bio_error = bp->bio_error;
pbp->bio_inbed++;
error = bp->bio_error;
g_destroy_bio(bp);
if (pbp->bio_children == pbp->bio_inbed) {
pbp->bio_completed = pbp->bio_length;
g_raid_iodone(pbp, error);
g_raid_iodone(pbp, pbp->bio_error);
}
}