From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 8 08:30:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 305D6A50 for ; Fri, 8 Mar 2013 08:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id F0E52DB for ; Fri, 8 Mar 2013 08:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r288U0Po004625 for ; Fri, 8 Mar 2013 08:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r288U0Na004624; Fri, 8 Mar 2013 08:30:00 GMT (envelope-from gnats) Resent-Date: Fri, 8 Mar 2013 08:30:00 GMT Resent-Message-Id: <201303080830.r288U0Na004624@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matt Burke Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C41C0851 for ; Fri, 8 Mar 2013 08:20:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B577EFF2 for ; Fri, 8 Mar 2013 08:20:17 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r288KGMG031303 for ; Fri, 8 Mar 2013 08:20:16 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r288KGog031302; Fri, 8 Mar 2013 08:20:16 GMT (envelope-from nobody) Message-Id: <201303080820.r288KGog031302@red.freebsd.org> Date: Fri, 8 Mar 2013 08:20:16 GMT From: Matt Burke To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/176744: BIO_FLUSH not recorded by devstats X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2013 08:30:01 -0000 >Number: 176744 >Category: kern >Synopsis: BIO_FLUSH not recorded by devstats >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 08 08:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Matt Burke >Release: 10.0-CURRENT >Organization: Critical Software >Environment: >Description: BIO_FLUSH operations are not recorded by devstats >How-To-Repeat: >Fix: Apply attached patch Patch attached with submission follows: diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 72e9162..0fb14c9 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -252,7 +252,7 @@ g_disk_done(struct bio *bp) if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; - if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0 && + if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE|BIO_FLUSH)) != 0 && (sc = bp2->bio_to->geom->softc) != NULL && (dp = sc->dp) != NULL) { devstat_end_transaction_bio(dp->d_devstat, bp); @@ -403,6 +403,7 @@ g_disk_start(struct bio *bp) } bp2->bio_done = g_disk_done; bp2->bio_disk = dp; + devstat_start_transaction_bio(dp->d_devstat, bp2); g_disk_lock_giant(dp); dp->d_strategy(bp2); g_disk_unlock_giant(dp); >Release-Note: >Audit-Trail: >Unformatted: