aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r--sys/geom/geom_subr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 2a6ce1ab6486..c70d55c6c321 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -1162,8 +1162,14 @@ g_std_done(struct bio *bp)
struct bio *bp2;
bp2 = bp->bio_parent;
- if (bp2->bio_error == 0)
- bp2->bio_error = bp->bio_error;
+ if (bp2->bio_error == 0) {
+ if ((bp->bio_flags & BIO_EXTERR) != 0) {
+ bp2->bio_flags |= BIO_EXTERR;
+ bp2->bio_exterr = bp->bio_exterr;
+ } else {
+ bp2->bio_error = bp->bio_error;
+ }
+ }
bp2->bio_completed += bp->bio_completed;
g_destroy_bio(bp);
bp2->bio_inbed++;