summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2010-08-12 04:14:11 +0100
committerAlasdair G Kergon <agk@redhat.com>2010-08-12 04:14:11 +0100
commitb441a262e7d1c56fbe21794c91d7a9c83809113f (patch)
treecc9acb2c3f7045ff513739fd81bba8a789d713b6 /drivers/md/dm-raid1.c
parent56a67df766039666f61fb15b079f713e44a735ae (diff)
downloadop-kernel-dev-b441a262e7d1c56fbe21794c91d7a9c83809113f.zip
op-kernel-dev-b441a262e7d1c56fbe21794c91d7a9c83809113f.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 7413626..7c081bc 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)
{
if (unlikely(!bio->bi_size))
return 0;
- return m->offset + (bio->bi_sector - m->ms->ti->begin);
+ return m->offset + dm_target_offset(m->ms->ti, bio->bi_sector);
}
static void map_bio(struct mirror *m, struct bio *bio)
OpenPOWER on IntegriCloud