MFC r326655,326668: correct error handling for graid

SINGLE/CONCAT/RAID5 volumes.

Approved by:    mav (mentor)
This commit is contained in:
Eugene Grosbein 2017-12-10 13:45:41 +00:00
parent cace5b5f05
commit fd440d3089
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=326745
2 changed files with 4 additions and 4 deletions

View File

@ -339,7 +339,7 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr,
pbp->bio_inbed++;
if (pbp->bio_children == pbp->bio_inbed) {
pbp->bio_completed = pbp->bio_length;
g_raid_iodone(pbp, bp->bio_error);
g_raid_iodone(pbp, pbp->bio_error);
}
}

View File

@ -371,15 +371,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);
}
}