Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 2017 20:09:17 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326668 - head/sys/geom/raid
Message-ID:  <201712072009.vB7K9H3N096670@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712072009.vB7K9H3N096670>