summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2010-08-12 05:14:11 +0200
committerAlasdair G Kergon <agk@redhat.com>2010-08-12 05:14:11 +0200
commitb441a262e7d1c56fbe21794c91d7a9c83809113f (patch)
treecc9acb2c3f7045ff513739fd81bba8a789d713b6 /drivers/md/dm-raid1.c
parentdm: factor out max_io_len_target_boundary (diff)
downloadlinux-b441a262e7d1c56fbe21794c91d7a9c83809113f.tar.xz
linux-b441a262e7d1c56fbe21794c91d7a9c83809113f.zip
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 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)
{
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)