diff options
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/block/elevator.c b/block/elevator.c index a6951f76ba0c..86836dd179c0 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/compiler.h> | 33 | #include <linux/compiler.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/blktrace_api.h> | 35 | #include <linux/blktrace_api.h> |
36 | #include <trace/block.h> | ||
36 | #include <linux/hash.h> | 37 | #include <linux/hash.h> |
37 | #include <linux/uaccess.h> | 38 | #include <linux/uaccess.h> |
38 | 39 | ||
@@ -41,6 +42,8 @@ | |||
41 | static DEFINE_SPINLOCK(elv_list_lock); | 42 | static DEFINE_SPINLOCK(elv_list_lock); |
42 | static LIST_HEAD(elv_list); | 43 | static LIST_HEAD(elv_list); |
43 | 44 | ||
45 | DEFINE_TRACE(block_rq_abort); | ||
46 | |||
44 | /* | 47 | /* |
45 | * Merge hash stuff. | 48 | * Merge hash stuff. |
46 | */ | 49 | */ |
@@ -52,6 +55,9 @@ static const int elv_hash_shift = 6; | |||
52 | #define rq_hash_key(rq) ((rq)->sector + (rq)->nr_sectors) | 55 | #define rq_hash_key(rq) ((rq)->sector + (rq)->nr_sectors) |
53 | #define ELV_ON_HASH(rq) (!hlist_unhashed(&(rq)->hash)) | 56 | #define ELV_ON_HASH(rq) (!hlist_unhashed(&(rq)->hash)) |
54 | 57 | ||
58 | DEFINE_TRACE(block_rq_insert); | ||
59 | DEFINE_TRACE(block_rq_issue); | ||
60 | |||
55 | /* | 61 | /* |
56 | * Query io scheduler to see if the current process issuing bio may be | 62 | * Query io scheduler to see if the current process issuing bio may be |
57 | * merged with rq. | 63 | * merged with rq. |
@@ -586,7 +592,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where) | |||
586 | unsigned ordseq; | 592 | unsigned ordseq; |
587 | int unplug_it = 1; | 593 | int unplug_it = 1; |
588 | 594 | ||
589 | blk_add_trace_rq(q, rq, BLK_TA_INSERT); | 595 | trace_block_rq_insert(q, rq); |
590 | 596 | ||
591 | rq->q = q; | 597 | rq->q = q; |
592 | 598 | ||
@@ -772,7 +778,7 @@ struct request *elv_next_request(struct request_queue *q) | |||
772 | * not be passed by new incoming requests | 778 | * not be passed by new incoming requests |
773 | */ | 779 | */ |
774 | rq->cmd_flags |= REQ_STARTED; | 780 | rq->cmd_flags |= REQ_STARTED; |
775 | blk_add_trace_rq(q, rq, BLK_TA_ISSUE); | 781 | trace_block_rq_issue(q, rq); |
776 | } | 782 | } |
777 | 783 | ||
778 | if (!q->boundary_rq || q->boundary_rq == rq) { | 784 | if (!q->boundary_rq || q->boundary_rq == rq) { |
@@ -914,7 +920,7 @@ void elv_abort_queue(struct request_queue *q) | |||
914 | while (!list_empty(&q->queue_head)) { | 920 | while (!list_empty(&q->queue_head)) { |
915 | rq = list_entry_rq(q->queue_head.next); | 921 | rq = list_entry_rq(q->queue_head.next); |
916 | rq->cmd_flags |= REQ_QUIET; | 922 | rq->cmd_flags |= REQ_QUIET; |
917 | blk_add_trace_rq(q, rq, BLK_TA_ABORT); | 923 | trace_block_rq_abort(q, rq); |
918 | __blk_end_request(rq, -EIO, blk_rq_bytes(rq)); | 924 | __blk_end_request(rq, -EIO, blk_rq_bytes(rq)); |
919 | } | 925 | } |
920 | } | 926 | } |