From owner-svn-src-stable@freebsd.org Sun Dec 10 13:45:43 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37B93E8D24A; Sun, 10 Dec 2017 13:45:43 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 023F271E22; Sun, 10 Dec 2017 13:45:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBADjfDt048144; Sun, 10 Dec 2017 13:45:41 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBADjf0x048142; Sun, 10 Dec 2017 13:45:41 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712101345.vBADjf0x048142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 10 Dec 2017 13:45:41 +0000 (UTC) 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 X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sys/geom/raid X-SVN-Commit-Revision: 326745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 13:45:43 -0000 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); } }