Commit 22a7c31a authored by Alan D. Brunelle's avatar Alan D. Brunelle Committed by Ingo Molnar

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: default avatarAlan D. Brunelle <alan.brunelle@hp.com>
Reviewed-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Reviewed-by: default avatarKOSAKI 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: default avatarIngo Molnar <mingo@elte.hu>
parent a42aaa3b
...@@ -1275,7 +1275,7 @@ static inline void blk_partition_remap(struct bio *bio) ...@@ -1275,7 +1275,7 @@ static inline void blk_partition_remap(struct bio *bio)
bio->bi_bdev = bdev->bd_contains; bio->bi_bdev = bdev->bd_contains;
trace_block_remap(bdev_get_queue(bio->bi_bdev), bio, trace_block_remap(bdev_get_queue(bio->bi_bdev), bio,
bdev->bd_dev, bio->bi_sector, bdev->bd_dev,
bio->bi_sector - p->start_sect); bio->bi_sector - p->start_sect);
} }
} }
...@@ -1444,8 +1444,7 @@ static inline void __generic_make_request(struct bio *bio) ...@@ -1444,8 +1444,7 @@ static inline void __generic_make_request(struct bio *bio)
goto end_io; goto end_io;
if (old_sector != -1) if (old_sector != -1)
trace_block_remap(q, bio, old_dev, bio->bi_sector, trace_block_remap(q, bio, old_dev, old_sector);
old_sector);
trace_block_bio_queue(q, bio); trace_block_bio_queue(q, bio);
......
...@@ -657,8 +657,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone, ...@@ -657,8 +657,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
/* the bio has been remapped so dispatch it */ /* the bio has been remapped so dispatch it */
trace_block_remap(bdev_get_queue(clone->bi_bdev), clone, trace_block_remap(bdev_get_queue(clone->bi_bdev), clone,
tio->io->bio->bi_bdev->bd_dev, tio->io->bio->bi_bdev->bd_dev, sector);
clone->bi_sector, sector);
generic_make_request(clone); generic_make_request(clone);
} else if (r < 0 || r == DM_MAPIO_REQUEUE) { } else if (r < 0 || r == DM_MAPIO_REQUEUE) {
......
...@@ -70,7 +70,7 @@ DECLARE_TRACE(block_split, ...@@ -70,7 +70,7 @@ DECLARE_TRACE(block_split,
DECLARE_TRACE(block_remap, DECLARE_TRACE(block_remap,
TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev,
sector_t to, sector_t from), sector_t to),
TP_ARGS(q, bio, dev, to, from)); TP_ARGS(q, bio, dev, to));
#endif #endif
...@@ -830,7 +830,6 @@ static void blk_add_trace_split(struct request_queue *q, struct bio *bio, ...@@ -830,7 +830,6 @@ static void blk_add_trace_split(struct request_queue *q, struct bio *bio,
* @q: queue the io is for * @q: queue the io is for
* @bio: the source bio * @bio: the source bio
* @dev: target device * @dev: target device
* @to: target sector
* @from: source sector * @from: source sector
* *
* Description: * Description:
...@@ -839,7 +838,7 @@ static void blk_add_trace_split(struct request_queue *q, struct bio *bio, ...@@ -839,7 +838,7 @@ static void blk_add_trace_split(struct request_queue *q, struct bio *bio,
* *
**/ **/
static void blk_add_trace_remap(struct request_queue *q, struct bio *bio, static void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
dev_t dev, sector_t to, sector_t from) dev_t dev, sector_t from)
{ {
struct blk_trace *bt = q->blk_trace; struct blk_trace *bt = q->blk_trace;
struct blk_io_trace_remap r; struct blk_io_trace_remap r;
...@@ -851,8 +850,9 @@ static void blk_add_trace_remap(struct request_queue *q, struct bio *bio, ...@@ -851,8 +850,9 @@ static void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
r.device_to = cpu_to_be32(bio->bi_bdev->bd_dev); r.device_to = cpu_to_be32(bio->bi_bdev->bd_dev);
r.sector_from = cpu_to_be64(from); r.sector_from = cpu_to_be64(from);
__blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, __blk_add_trace(bt, bio->bi_sector, bio->bi_size, bio->bi_rw,
!bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r); BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE),
sizeof(r), &r);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment