summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2005-09-30 17:32:08 +0000
committertegge <tegge@FreeBSD.org>2005-09-30 17:32:08 +0000
commitdbcc5e2770c9a125a38072056024bbb2164fe5fc (patch)
treec4b438245cc7962c8b6ee17f63011df8f664e78b /sys/geom
parentc2b51d2f4ca3a749e5d877e3d9d978b7efb88dbe (diff)
downloadFreeBSD-src-dbcc5e2770c9a125a38072056024bbb2164fe5fc.zip
FreeBSD-src-dbcc5e2770c9a125a38072056024bbb2164fe5fc.tar.gz
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.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_disk.c6
1 files changed, 3 insertions, 3 deletions
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);
OpenPOWER on IntegriCloud