From owner-freebsd-fs@FreeBSD.ORG Wed Mar 6 11:48:10 2013 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6B2E453D for ; Wed, 6 Mar 2013 11:48:10 +0000 (UTC) (envelope-from mattblists@icritical.com) Received: from mail2.icritical.com (mail2.icritical.com [212.57.248.50]) by mx1.freebsd.org (Postfix) with SMTP id C11B33D4 for ; Wed, 6 Mar 2013 11:48:09 +0000 (UTC) Received: (qmail 2103 invoked from network); 6 Mar 2013 11:41:47 -0000 Received: from localhost (127.0.0.1) by mail2.icritical.com with SMTP; 6 Mar 2013 11:41:47 -0000 Received: (qmail 2058 invoked by uid 599); 6 Mar 2013 11:41:46 -0000 Received: from unknown (HELO PDC002.icritical.int) (212.57.254.146) by mail2.icritical.com (qpsmtpd/0.28) with ESMTP; Wed, 06 Mar 2013 11:41:46 +0000 Message-ID: <51372B71.7030107@icritical.com> Date: Wed, 6 Mar 2013 11:41:37 +0000 From: Matt Burke User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130122 Thunderbird/17.0.2 MIME-Version: 1.0 To: Subject: No stats on BIO_FLUSH Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-TLS-Incoming: YES X-Virus-Scanned: by iCritical at mail2.icritical.com X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2013 11:48:10 -0000 Is there any reason BIO_FLUSH operations aren't recorded by devstats? The patch below causes flushes to be recorded under DEVSTAT_NO_DATA without any apparent ill effects. --- 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); -- Sorry for the following... iCritical is a brand of Critical Software Ltd. Registered in England & Wales: 04909220. Registered Office: IC2, Keele Science Park, Keele, Staffordshire, ST5 5NH. This message has been scanned for security threats by iCritical. The information contained in this message is confidential and intended for the addressee only. If you have received this message in error, or there are any problems with its content, please contact the sender.