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:
Eugene Grosbein 2017-12-07 20:09:17 +00:00
parent 496a68519f
commit 1b8ea9beff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326668

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);
}
}