svn commit: r326668 - head/sys/geom/raid
Eugene Grosbein
eugen at FreeBSD.org
Thu Dec 7 20:09:18 UTC 2017
Author: eugen
Date: Thu Dec 7 20:09:17 2017
New Revision: 326668
URL: https://svnweb.freebsd.org/changeset/base/326668
Log:
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
Modified:
head/sys/geom/raid/tr_raid5.c
Modified: head/sys/geom/raid/tr_raid5.c
==============================================================================
--- head/sys/geom/raid/tr_raid5.c Thu Dec 7 20:00:19 2017 (r326667)
+++ head/sys/geom/raid/tr_raid5.c Thu Dec 7 20:09:17 2017 (r326668)
@@ -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);
}
}
More information about the svn-src-all
mailing list