diff options
author | Alasdair G Kergon <agk@redhat.com> | 2010-08-11 23:14:11 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2010-08-11 23:14:11 -0400 |
commit | b441a262e7d1c56fbe21794c91d7a9c83809113f (patch) | |
tree | cc9acb2c3f7045ff513739fd81bba8a789d713b6 /drivers/md/dm-raid1.c | |
parent | 56a67df766039666f61fb15b079f713e44a735ae (diff) |
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-raid1.c')
-rw-r--r-- | drivers/md/dm-raid1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 74136262d654..7c081bcbc3cf 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -445,7 +445,7 @@ static sector_t map_sector(struct mirror *m, struct bio *bio) | |||
445 | { | 445 | { |
446 | if (unlikely(!bio->bi_size)) | 446 | if (unlikely(!bio->bi_size)) |
447 | return 0; | 447 | return 0; |
448 | return m->offset + (bio->bi_sector - m->ms->ti->begin); | 448 | return m->offset + dm_target_offset(m->ms->ti, bio->bi_sector); |
449 | } | 449 | } |
450 | 450 | ||
451 | static void map_bio(struct mirror *m, struct bio *bio) | 451 | static void map_bio(struct mirror *m, struct bio *bio) |