No stats on BIO_FLUSH
Matt Burke
mattblists at icritical.com
Wed Mar 6 11:48:10 UTC 2013
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.
More information about the freebsd-fs
mailing list