diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/atapi-fd.c | 4 | ||||
-rw-r--r-- | sys/dev/ccd/ccd.c | 9 | ||||
-rw-r--r-- | sys/dev/fdc/fdc.c | 7 | ||||
-rw-r--r-- | sys/dev/ida/ida_disk.c | 4 |
4 files changed, 4 insertions, 20 deletions
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c index 7191f79..5c98107 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -395,9 +395,7 @@ afd_done(struct atapi_request *request) else bp->b_resid += request->bytecount; - devstat_end_transaction(&fdp->stats, bp->b_bcount - bp->b_resid, - DEVSTAT_TAG_NONE, - (bp->b_flags&B_READ) ? DEVSTAT_READ:DEVSTAT_WRITE); + devstat_end_transaction_buf(&fdp->stats, bp); biodone(bp); afd_start(fdp); diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index a889ca3..e13ac65 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -954,16 +954,9 @@ ccdintr(cs, bp) /* * Request is done for better or worse, wakeup the top half. */ - /* Record device statistics */ - devstat_end_transaction(&cs->device_stats, - bp->b_bcount - bp->b_resid, - (bp->b_flags & B_ORDERED) ? - DEVSTAT_TAG_ORDERED : DEVSTAT_TAG_SIMPLE, - (bp->b_flags & B_READ) ? DEVSTAT_READ : - DEVSTAT_WRITE); - if (bp->b_flags & B_ERROR) bp->b_resid = bp->b_bcount; + devstat_end_transaction_buf(&cs->device_stats, bp); biodone(bp); } diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 4075bf4..38fd38e 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -1935,12 +1935,7 @@ fdstate(fdc_p fdc) /* ALL DONE */ fd->skip = 0; fdc->bp = NULL; - /* Tell devstat we have finished with the transaction */ - devstat_end_transaction(&fd->device_stats, - bp->b_bcount - bp->b_resid, - DEVSTAT_TAG_NONE, - (bp->b_flags & B_READ) ? - DEVSTAT_READ : DEVSTAT_WRITE); + devstat_end_transaction_buf(&fd->device_stats, bp); biodone(bp); fdc->fd = (fd_p) 0; fdc->fdu = -1; diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index 2874d25..6ec65cb 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -254,10 +254,8 @@ id_intr(struct buf *bp) else bp->b_resid = 0; + devstat_end_transaction_buf(&drv->stats, bp); biodone(bp); - devstat_end_transaction(&drv->stats, - bp->b_bcount - bp->b_resid, DEVSTAT_TAG_NONE, - (bp->b_flags & B_READ) ? DEVSTAT_READ : DEVSTAT_WRITE); } static void |