Page MenuHomeFreeBSD

D46034.diff
No OneTemporary

D46034.diff

diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c
--- a/sys/cam/cam_iosched.c
+++ b/sys/cam/cam_iosched.c
@@ -758,7 +758,7 @@
#ifdef CAM_IOSCHED_DYNAMIC
static void
cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
- sbintime_t sim_latency, int cmd, size_t size);
+ sbintime_t sim_latency, const struct bio *bp);
#endif
static inline bool
@@ -1801,8 +1801,8 @@
sim_latency = cam_iosched_sbintime_t(done_ccb->ccb_h.qos.periph_data);
- cam_iosched_io_metric_update(isc, sim_latency,
- bp->bio_cmd, bp->bio_bcount);
+ cam_iosched_io_metric_update(isc, sim_latency, bp);
+
/*
* Debugging code: allow callbacks to the periph driver when latency max
* is exceeded. This can be useful for triggering external debugging actions.
@@ -1924,7 +1924,8 @@
};
static void
-cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency)
+cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency,
+ const struct bio *bp __unused)
{
sbintime_t y, deltasq, delta;
int i;
@@ -2014,18 +2015,17 @@
static void
cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
- sbintime_t sim_latency, int cmd, size_t size)
+ sbintime_t sim_latency, const struct bio *bp)
{
- /* xxx Do we need to scale based on the size of the I/O ? */
- switch (cmd) {
+ switch (bp->bio_cmd) {
case BIO_READ:
- cam_iosched_update(&isc->read_stats, sim_latency);
+ cam_iosched_update(&isc->read_stats, sim_latency, bp);
break;
case BIO_WRITE:
- cam_iosched_update(&isc->write_stats, sim_latency);
+ cam_iosched_update(&isc->write_stats, sim_latency, bp);
break;
case BIO_DELETE:
- cam_iosched_update(&isc->trim_stats, sim_latency);
+ cam_iosched_update(&isc->trim_stats, sim_latency, bp);
break;
default:
break;

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 4:14 PM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14700550
Default Alt Text
D46034.diff (1 KB)

Event Timeline