diff options
author | Alasdair G Kergon <agk@redhat.com> | 2010-08-12 04:14:11 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2010-08-12 04:14:11 +0100 |
commit | b441a262e7d1c56fbe21794c91d7a9c83809113f (patch) | |
tree | cc9acb2c3f7045ff513739fd81bba8a789d713b6 /drivers/md/dm-delay.c | |
parent | 56a67df766039666f61fb15b079f713e44a735ae (diff) | |
download | linux-b441a262e7d1c56fbe21794c91d7a9c83809113f.tar.bz2 |
dm: use dm_target_offset macro
Use new dm_target_offset() macro to avoid most references to ti->begin
in dm targets.
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-delay.c')
-rw-r--r-- | drivers/md/dm-delay.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index 852052880d7a..a91049e05219 100644 --- a/drivers/md/dm-delay.c +++ b/drivers/md/dm-delay.c @@ -281,14 +281,13 @@ static int delay_map(struct dm_target *ti, struct bio *bio, bio->bi_bdev = dc->dev_write->bdev; if (bio_sectors(bio)) bio->bi_sector = dc->start_write + - (bio->bi_sector - ti->begin); + dm_target_offset(ti, bio->bi_sector); return delay_bio(dc, dc->write_delay, bio); } bio->bi_bdev = dc->dev_read->bdev; - bio->bi_sector = dc->start_read + - (bio->bi_sector - ti->begin); + bio->bi_sector = dc->start_read + dm_target_offset(ti, bio->bi_sector); return delay_bio(dc, dc->read_delay, bio); } |