diff options
Diffstat (limited to 'driver/gator_events_block.c')
-rw-r--r-- | driver/gator_events_block.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/driver/gator_events_block.c b/driver/gator_events_block.c index b2bc414..03eed4f 100644 --- a/driver/gator_events_block.c +++ b/driver/gator_events_block.c | |||
@@ -28,15 +28,25 @@ static ulong block_rq_rd_key; | |||
28 | static atomic_t blockCnt[BLOCK_TOTAL]; | 28 | static atomic_t blockCnt[BLOCK_TOTAL]; |
29 | static int blockGet[BLOCK_TOTAL * 4]; | 29 | static int blockGet[BLOCK_TOTAL * 4]; |
30 | 30 | ||
31 | // Tracepoint changed in 3.15 backported to older kernels. The Makefile tries to autodetect the correct value, but if it fails change the #if below | ||
32 | #if OLD_BLOCK_RQ_COMPLETE | ||
31 | GATOR_DEFINE_PROBE(block_rq_complete, TP_PROTO(struct request_queue *q, struct request *rq)) | 33 | GATOR_DEFINE_PROBE(block_rq_complete, TP_PROTO(struct request_queue *q, struct request *rq)) |
34 | #else | ||
35 | GATOR_DEFINE_PROBE(block_rq_complete, TP_PROTO(struct request_queue *q, struct request *rq, unsigned int nr_bytes)) | ||
36 | #endif | ||
32 | { | 37 | { |
33 | int write, size; | 38 | int write; |
39 | unsigned int size; | ||
34 | 40 | ||
35 | if (!rq) | 41 | if (!rq) |
36 | return; | 42 | return; |
37 | 43 | ||
38 | write = rq->cmd_flags & EVENTWRITE; | 44 | write = rq->cmd_flags & EVENTWRITE; |
45 | #if OLD_BLOCK_RQ_COMPLETE | ||
39 | size = rq->resid_len; | 46 | size = rq->resid_len; |
47 | #else | ||
48 | size = nr_bytes; | ||
49 | #endif | ||
40 | 50 | ||
41 | if (!size) | 51 | if (!size) |
42 | return; | 52 | return; |