Date: Fri, 8 Mar 2013 08:20:16 GMT From: Matt Burke <mattblists@icritical.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/176744: BIO_FLUSH not recorded by devstats Message-ID: <201303080820.r288KGog031302@red.freebsd.org> Resent-Message-ID: <201303080830.r288U0Na004624@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303080820.r288KGog031302>