From owner-svn-src-all@FreeBSD.ORG Thu May 8 12:35:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79E98D5D; Thu, 8 May 2014 12:35:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 671E0A54; Thu, 8 May 2014 12:35:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s48CZcL8094610; Thu, 8 May 2014 12:35:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s48CZcV8094609; Thu, 8 May 2014 12:35:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405081235.s48CZcV8094609@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 May 2014 12:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265674 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 12:35:38 -0000 Author: mav Date: Thu May 8 12:35:37 2014 New Revision: 265674 URL: http://svnweb.freebsd.org/changeset/base/265674 Log: MFC r256607, r259247: Fix passing uninitialized bio_resid argument to g_trace(). Modified: stable/9/sys/geom/geom_dev.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_dev.c ============================================================================== --- stable/9/sys/geom/geom_dev.c Thu May 8 12:28:24 2014 (r265673) +++ stable/9/sys/geom/geom_dev.c Thu May 8 12:35:37 2014 (r265674) @@ -489,16 +489,16 @@ g_dev_done(struct bio *bp2) sc = cp->private; bp = bp2->bio_parent; bp->bio_error = bp2->bio_error; - if (bp->bio_error != 0) { + bp->bio_completed = bp2->bio_completed; + bp->bio_resid = bp->bio_length - bp2->bio_completed; + if (bp2->bio_error != 0) { g_trace(G_T_BIO, "g_dev_done(%p) had error %d", - bp2, bp->bio_error); + bp2, bp2->bio_error); bp->bio_flags |= BIO_ERROR; } else { g_trace(G_T_BIO, "g_dev_done(%p/%p) resid %ld completed %jd", - bp2, bp, bp->bio_resid, (intmax_t)bp2->bio_completed); + bp2, bp, bp2->bio_resid, (intmax_t)bp2->bio_completed); } - bp->bio_resid = bp->bio_length - bp2->bio_completed; - bp->bio_completed = bp2->bio_completed; g_destroy_bio(bp2); destroy = 0; mtx_lock(&sc->sc_mtx);