>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:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to