From 9da6f47bc8a92fc0ae558eb9568951d376fc13c3 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Wed, 11 Jun 2014 10:33:39 +0100 Subject: [PATCH] gator: Fix use tracepoint block_rq_complete following upstream changes Commit af5040da01ef980670b3741b3e10733ee3e33566 (blktrace: fix accounting of partially completed requests) changes the API for the block_rq_complete tracepoint; update Gator's use of this. Signed-off-by: Jon Medhurst --- drivers/gator/gator_events_block.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gator/gator_events_block.c b/drivers/gator/gator_events_block.c index b2bc414e462e..0a1dc1aef523 100644 --- a/drivers/gator/gator_events_block.c +++ b/drivers/gator/gator_events_block.c @@ -28,26 +28,25 @@ static ulong block_rq_rd_key; static atomic_t blockCnt[BLOCK_TOTAL]; static int blockGet[BLOCK_TOTAL * 4]; -GATOR_DEFINE_PROBE(block_rq_complete, TP_PROTO(struct request_queue *q, struct request *rq)) +GATOR_DEFINE_PROBE(block_rq_complete, TP_PROTO(struct request_queue *q, struct request *rq, unsigned int nr_bytes)) { - int write, size; + int write; if (!rq) return; write = rq->cmd_flags & EVENTWRITE; - size = rq->resid_len; - if (!size) + if (!nr_bytes) return; if (write) { if (block_rq_wr_enabled) { - atomic_add(size, &blockCnt[BLOCK_RQ_WR]); + atomic_add(nr_bytes, &blockCnt[BLOCK_RQ_WR]); } } else { if (block_rq_rd_enabled) { - atomic_add(size, &blockCnt[BLOCK_RQ_RD]); + atomic_add(nr_bytes, &blockCnt[BLOCK_RQ_RD]); } } } -- 2.34.1