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>
This commit is contained in:
Alasdair G Kergon
2010-08-12 04:14:11 +01:00
parent 56a67df766
commit b441a262e7
5 changed files with 7 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ static sector_t linear_map_sector(struct dm_target *ti, sector_t bi_sector)
{
struct linear_c *lc = ti->private;
return lc->start + (bi_sector - ti->begin);
return lc->start + dm_target_offset(ti, bi_sector);
}
static void linear_map_bio(struct dm_target *ti, struct bio *bio)