diff options
Diffstat (limited to 'kernel/trace/blktrace.c')
-rw-r--r-- | kernel/trace/blktrace.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 7bd6a9893c24..39af8af6fc30 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
@@ -669,12 +669,12 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq, | |||
669 | 669 | ||
670 | if (blk_pc_request(rq)) { | 670 | if (blk_pc_request(rq)) { |
671 | what |= BLK_TC_ACT(BLK_TC_PC); | 671 | what |= BLK_TC_ACT(BLK_TC_PC); |
672 | __blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors, | 672 | __blk_add_trace(bt, 0, blk_rq_bytes(rq), rw, |
673 | rq->cmd_len, rq->cmd); | 673 | what, rq->errors, rq->cmd_len, rq->cmd); |
674 | } else { | 674 | } else { |
675 | what |= BLK_TC_ACT(BLK_TC_FS); | 675 | what |= BLK_TC_ACT(BLK_TC_FS); |
676 | __blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9, | 676 | __blk_add_trace(bt, blk_rq_pos(rq), blk_rq_bytes(rq), rw, |
677 | rw, what, rq->errors, 0, NULL); | 677 | what, rq->errors, 0, NULL); |
678 | } | 678 | } |
679 | } | 679 | } |
680 | 680 | ||
@@ -881,11 +881,11 @@ void blk_add_driver_data(struct request_queue *q, | |||
881 | return; | 881 | return; |
882 | 882 | ||
883 | if (blk_pc_request(rq)) | 883 | if (blk_pc_request(rq)) |
884 | __blk_add_trace(bt, 0, rq->data_len, 0, BLK_TA_DRV_DATA, | 884 | __blk_add_trace(bt, 0, blk_rq_bytes(rq), 0, |
885 | rq->errors, len, data); | 885 | BLK_TA_DRV_DATA, rq->errors, len, data); |
886 | else | 886 | else |
887 | __blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9, | 887 | __blk_add_trace(bt, blk_rq_pos(rq), blk_rq_bytes(rq), 0, |
888 | 0, BLK_TA_DRV_DATA, rq->errors, len, data); | 888 | BLK_TA_DRV_DATA, rq->errors, len, data); |
889 | } | 889 | } |
890 | EXPORT_SYMBOL_GPL(blk_add_driver_data); | 890 | EXPORT_SYMBOL_GPL(blk_add_driver_data); |
891 | 891 | ||
@@ -1724,10 +1724,7 @@ void blk_fill_rwbs_rq(char *rwbs, struct request *rq) | |||
1724 | if (blk_discard_rq(rq)) | 1724 | if (blk_discard_rq(rq)) |
1725 | rw |= (1 << BIO_RW_DISCARD); | 1725 | rw |= (1 << BIO_RW_DISCARD); |
1726 | 1726 | ||
1727 | if (blk_pc_request(rq)) | 1727 | bytes = blk_rq_bytes(rq); |
1728 | bytes = rq->data_len; | ||
1729 | else | ||
1730 | bytes = rq->hard_nr_sectors << 9; | ||
1731 | 1728 | ||
1732 | blk_fill_rwbs(rwbs, rw, bytes); | 1729 | blk_fill_rwbs(rwbs, rw, bytes); |
1733 | } | 1730 | } |