Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63892
b: refs/heads/master
c: c7149d6
h: refs/heads/master
v: v3
  • Loading branch information
Alan D. Brunelle authored and Jens Axboe committed Aug 11, 2007
1 parent 4c1db5a commit 8b7b6e4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec05b297f91a443aa26b74059b573bfad49c9ebb
refs/heads/master: c7149d6bce2561aeaa48caaa1700aa8b3b22008f
4 changes: 4 additions & 0 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3047,6 +3047,10 @@ static inline void blk_partition_remap(struct bio *bio)

bio->bi_sector += p->start_sect;
bio->bi_bdev = bdev->bd_contains;

blk_add_trace_remap(bdev_get_queue(bio->bi_bdev), bio,
bdev->bd_dev, bio->bi_sector,
bio->bi_sector - p->start_sect);
}
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
/* the bio has been remapped so dispatch it */

blk_add_trace_remap(bdev_get_queue(clone->bi_bdev), clone,
tio->io->bio->bi_bdev->bd_dev, sector,
clone->bi_sector);
tio->io->bio->bi_bdev->bd_dev,
clone->bi_sector, sector);

generic_make_request(clone);
} else if (r < 0 || r == DM_MAPIO_REQUEUE) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/blktrace_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct blk_io_trace {
*/
struct blk_io_trace_remap {
__be32 device;
u32 __pad;
__be32 device_from;
__be64 sector;
};

Expand Down Expand Up @@ -272,6 +272,7 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
return;

r.device = cpu_to_be32(dev);
r.device_from = cpu_to_be32(bio->bi_bdev->bd_dev);
r.sector = cpu_to_be64(to);

__blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
Expand Down

0 comments on commit 8b7b6e4

Please sign in to comment.