gator: Fix use tracepoint block_rq_complete following upstream changes
authorJon Medhurst <tixy@linaro.org>
Wed, 11 Jun 2014 09:33:39 +0000 (10:33 +0100)
committerJon Medhurst <tixy@linaro.org>
Thu, 12 Jun 2014 13:01:14 +0000 (14:01 +0100)
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 <tixy@linaro.org>
drivers/gator/gator_events_block.c

index b2bc414e462e4df23b86e40abfa04ba55e9e974a..0a1dc1aef5233449de2e2e0c68571a1ccd484e43 100644 (file)
@@ -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]);
                }
        }
 }