aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/blktrace.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-05-07 09:24:38 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-11 03:50:53 -0400
commit5b93629b4509c03ffa87a9316412fedf6f58cb37 (patch)
treead5ceda3f718361b8df3057b4f9edcc79aa4cd9d /kernel/trace/blktrace.c
parentc3a4d78c580de4edc9ef0f7c59812fb02ceb037f (diff)
block: implement blk_rq_pos/[cur_]sectors() and convert obvious ones
Implement accessors - blk_rq_pos(), blk_rq_sectors() and blk_rq_cur_sectors() which return rq->hard_sector, rq->hard_nr_sectors and rq->hard_cur_sectors respectively and convert direct references of the said fields to the accessors. This is in preparation of request data length handling cleanup. Geert : suggested adding const to struct request * parameter to accessors Sergei : spotted error in patch description [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Tested-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Grant Likely <grant.likely@secretlab.ca> Ackec-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'kernel/trace/blktrace.c')
-rw-r--r--kernel/trace/blktrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 921ef5d1f0ba..42f1c11e754c 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -646,7 +646,7 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq,
646 rq->cmd_len, rq->cmd); 646 rq->cmd_len, rq->cmd);
647 } else { 647 } else {
648 what |= BLK_TC_ACT(BLK_TC_FS); 648 what |= BLK_TC_ACT(BLK_TC_FS);
649 __blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9, 649 __blk_add_trace(bt, blk_rq_pos(rq), blk_rq_sectors(rq) << 9,
650 rw, what, rq->errors, 0, NULL); 650 rw, what, rq->errors, 0, NULL);
651 } 651 }
652} 652}
@@ -857,7 +857,7 @@ void blk_add_driver_data(struct request_queue *q,
857 __blk_add_trace(bt, 0, rq->data_len, 0, BLK_TA_DRV_DATA, 857 __blk_add_trace(bt, 0, rq->data_len, 0, BLK_TA_DRV_DATA,
858 rq->errors, len, data); 858 rq->errors, len, data);
859 else 859 else
860 __blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9, 860 __blk_add_trace(bt, blk_rq_pos(rq), blk_rq_sectors(rq) << 9,
861 0, BLK_TA_DRV_DATA, rq->errors, len, data); 861 0, BLK_TA_DRV_DATA, rq->errors, len, data);
862} 862}
863EXPORT_SYMBOL_GPL(blk_add_driver_data); 863EXPORT_SYMBOL_GPL(blk_add_driver_data);