From dbcc5e2770c9a125a38072056024bbb2164fe5fc Mon Sep 17 00:00:00 2001 From: tegge Date: Fri, 30 Sep 2005 17:32:08 +0000 Subject: Move some devstat collection to below where large IO operations are chopped up. This make iostat report operations passed down to the device driver instead of operations passed down to GEOM disk. The transfer size limit imposed by the device driver is no longer hidden, improving the correlation between iostat output and device driver workload. --- sys/geom/geom_disk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/geom') diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 53c8c15..42c40bc 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -202,12 +202,12 @@ g_disk_done(struct bio *bp) if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; + if ((dp = bp2->bio_to->geom->softc)) + devstat_end_transaction_bio(dp->d_devstat, bp); g_destroy_bio(bp); bp2->bio_inbed++; if (bp2->bio_children == bp2->bio_inbed) { bp2->bio_resid = bp2->bio_bcount - bp2->bio_completed; - if ((dp = bp2->bio_to->geom->softc)) - devstat_end_transaction_bio(dp->d_devstat, bp2); g_io_deliver(bp2, bp2->bio_error); } mtx_unlock(&g_disk_done_mtx); @@ -261,7 +261,6 @@ g_disk_start(struct bio *bp) error = ENOMEM; break; } - devstat_start_transaction_bio(dp->d_devstat, bp); do { bp2->bio_offset += off; bp2->bio_length -= off; @@ -285,6 +284,7 @@ g_disk_start(struct bio *bp) bp2->bio_pblkno = bp2->bio_offset / dp->d_sectorsize; bp2->bio_bcount = bp2->bio_length; 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); -- cgit v1.1