Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2017 13:45:41 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r326745 - stable/10/sys/geom/raid
Message-ID:  <201712101345.vBADjf0x048142@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Sun Dec 10 13:45:41 2017
New Revision: 326745
URL: https://svnweb.freebsd.org/changeset/base/326745

Log:
  MFC r326655,326668: correct error handling for graid
  SINGLE/CONCAT/RAID5 volumes.
  
  Approved by:    mav (mentor)

Modified:
  stable/10/sys/geom/raid/tr_concat.c
  stable/10/sys/geom/raid/tr_raid5.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/raid/tr_concat.c
==============================================================================
--- stable/10/sys/geom/raid/tr_concat.c	Sun Dec 10 13:44:58 2017	(r326744)
+++ stable/10/sys/geom/raid/tr_concat.c	Sun Dec 10 13:45:41 2017	(r326745)
@@ -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);
 	}
 }
 

Modified: stable/10/sys/geom/raid/tr_raid5.c
==============================================================================
--- stable/10/sys/geom/raid/tr_raid5.c	Sun Dec 10 13:44:58 2017	(r326744)
+++ stable/10/sys/geom/raid/tr_raid5.c	Sun Dec 10 13:45:41 2017	(r326745)
@@ -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);
 	}
 }
 



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