aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan D. Brunelle <Alan.Brunelle@hp.com>2009-05-04 16:35:08 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-06 08:13:01 -0400
commit22a7c31a9659deaddafbbcec6562d44141e84474 (patch)
tree0fe1c64e82d673597c78c6ce5f3569d9101b5281
parenta42aaa3bbce85ac487ad4fad5db99e8e91b7aac1 (diff)
blktrace: from-sector redundant in trace_block_remap
Remove redundant from-sector parameter: it's /always/ the bio's sector passed in. [ Impact: cleanup ] Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <49FF517C.7000503@hp.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--block/blk-core.c5
-rw-r--r--drivers/md/dm.c3
-rw-r--r--include/trace/block.h4
-rw-r--r--kernel/trace/blktrace.c8
4 files changed, 9 insertions, 11 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 07ab75403e1a..a5f747a8312e 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1275,7 +1275,7 @@ static inline void blk_partition_remap(struct bio *bio)
1275 bio->bi_bdev = bdev->bd_contains; 1275 bio->bi_bdev = bdev->bd_contains;
1276 1276
1277 trace_block_remap(bdev_get_queue(bio->bi_bdev), bio, 1277 trace_block_remap(bdev_get_queue(bio->bi_bdev), bio,
1278 bdev->bd_dev, bio->bi_sector, 1278 bdev->bd_dev,
1279 bio->bi_sector - p->start_sect); 1279 bio->bi_sector - p->start_sect);
1280 } 1280 }
1281} 1281}
@@ -1444,8 +1444,7 @@ static inline void __generic_make_request(struct bio *bio)
1444 goto end_io; 1444 goto end_io;
1445 1445
1446 if (old_sector != -1) 1446 if (old_sector != -1)
1447 trace_block_remap(q, bio, old_dev, bio->bi_sector, 1447 trace_block_remap(q, bio, old_dev, old_sector);
1448 old_sector);
1449 1448
1450 trace_block_bio_queue(q, bio); 1449 trace_block_bio_queue(q, bio);
1451 1450
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 8a994be035ba..b01514afb6b5 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -657,8 +657,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
657 /* the bio has been remapped so dispatch it */ 657 /* the bio has been remapped so dispatch it */
658 658
659 trace_block_remap(bdev_get_queue(clone->bi_bdev), clone, 659 trace_block_remap(bdev_get_queue(clone->bi_bdev), clone,
660 tio->io->bio->bi_bdev->bd_dev, 660 tio->io->bio->bi_bdev->bd_dev, sector);
661 clone->bi_sector, sector);
662 661
663 generic_make_request(clone); 662 generic_make_request(clone);
664 } else if (r < 0 || r == DM_MAPIO_REQUEUE) { 663 } else if (r < 0 || r == DM_MAPIO_REQUEUE) {
diff --git a/include/trace/block.h b/include/trace/block.h
index 87f6456fd32e..8ac945b7746e 100644
--- a/include/trace/block.h
+++ b/include/trace/block.h
@@ -70,7 +70,7 @@ DECLARE_TRACE(block_split,
70 70
71DECLARE_TRACE(block_remap, 71DECLARE_TRACE(block_remap,
72 TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, 72 TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev,
73 sector_t to, sector_t from), 73 sector_t to),
74 TP_ARGS(q, bio, dev, to, from)); 74 TP_ARGS(q, bio, dev, to));
75 75
76#endif 76#endif
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index f8d46d6f5d34..e099f8cc1d1c 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -830,7 +830,6 @@ static void blk_add_trace_split(struct request_queue *q, struct bio *bio,
830 * @q: queue the io is for 830 * @q: queue the io is for
831 * @bio: the source bio 831 * @bio: the source bio
832 * @dev: target device 832 * @dev: target device
833 * @to: target sector
834 * @from: source sector 833 * @from: source sector
835 * 834 *
836 * Description: 835 * Description:
@@ -839,7 +838,7 @@ static void blk_add_trace_split(struct request_queue *q, struct bio *bio,
839 * 838 *
840 **/ 839 **/
841static void blk_add_trace_remap(struct request_queue *q, struct bio *bio, 840static void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
842 dev_t dev, sector_t to, sector_t from) 841 dev_t dev, sector_t from)
843{ 842{
844 struct blk_trace *bt = q->blk_trace; 843 struct blk_trace *bt = q->blk_trace;
845 struct blk_io_trace_remap r; 844 struct blk_io_trace_remap r;
@@ -851,8 +850,9 @@ static void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
851 r.device_to = cpu_to_be32(bio->bi_bdev->bd_dev); 850 r.device_to = cpu_to_be32(bio->bi_bdev->bd_dev);
852 r.sector_from = cpu_to_be64(from); 851 r.sector_from = cpu_to_be64(from);
853 852
854 __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, 853 __blk_add_trace(bt, bio->bi_sector, bio->bi_size, bio->bi_rw,
855 !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r); 854 BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE),
855 sizeof(r), &r);
856} 856}
857 857
858/** 858/**