aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/block.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/block.h')
-rw-r--r--include/trace/events/block.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index d870a918559c..d8ce278515c3 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -25,8 +25,10 @@ DECLARE_EVENT_CLASS(block_rq_with_error,
25 25
26 TP_fast_assign( 26 TP_fast_assign(
27 __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; 27 __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0;
28 __entry->sector = blk_pc_request(rq) ? 0 : blk_rq_pos(rq); 28 __entry->sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
29 __entry->nr_sector = blk_pc_request(rq) ? 0 : blk_rq_sectors(rq); 29 0 : blk_rq_pos(rq);
30 __entry->nr_sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
31 0 : blk_rq_sectors(rq);
30 __entry->errors = rq->errors; 32 __entry->errors = rq->errors;
31 33
32 blk_fill_rwbs_rq(__entry->rwbs, rq); 34 blk_fill_rwbs_rq(__entry->rwbs, rq);
@@ -109,9 +111,12 @@ DECLARE_EVENT_CLASS(block_rq,
109 111
110 TP_fast_assign( 112 TP_fast_assign(
111 __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; 113 __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0;
112 __entry->sector = blk_pc_request(rq) ? 0 : blk_rq_pos(rq); 114 __entry->sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
113 __entry->nr_sector = blk_pc_request(rq) ? 0 : blk_rq_sectors(rq); 115 0 : blk_rq_pos(rq);
114 __entry->bytes = blk_pc_request(rq) ? blk_rq_bytes(rq) : 0; 116 __entry->nr_sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
117 0 : blk_rq_sectors(rq);
118 __entry->bytes = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ?
119 blk_rq_bytes(rq) : 0;
115 120
116 blk_fill_rwbs_rq(__entry->rwbs, rq); 121 blk_fill_rwbs_rq(__entry->rwbs, rq);
117 blk_dump_cmd(__get_str(cmd), rq); 122 blk_dump_cmd(__get_str(cmd), rq);