提交 6efd6e83 编写于 作者: A Alasdair G Kergon

dm thin: use dm_target_offset

Use dm_target_offset wrapper instead of referencing the awkward ti->begin
explicitly.
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 2dd9c257
...@@ -2389,7 +2389,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv) ...@@ -2389,7 +2389,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
static int thin_map(struct dm_target *ti, struct bio *bio, static int thin_map(struct dm_target *ti, struct bio *bio,
union map_info *map_context) union map_info *map_context)
{ {
bio->bi_sector -= ti->begin; bio->bi_sector = dm_target_offset(ti, bio->bi_sector);
return thin_bio_map(ti, bio, map_context); return thin_bio_map(ti, bio, map_context);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册