aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-linear.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r--drivers/md/dm-linear.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index 9200dbf2391a..3921e3bb43c1 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -53,6 +53,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv)
53 } 53 }
54 54
55 ti->num_flush_requests = 1; 55 ti->num_flush_requests = 1;
56 ti->num_discard_requests = 1;
56 ti->private = lc; 57 ti->private = lc;
57 return 0; 58 return 0;
58 59
@@ -73,7 +74,7 @@ static sector_t linear_map_sector(struct dm_target *ti, sector_t bi_sector)
73{ 74{
74 struct linear_c *lc = ti->private; 75 struct linear_c *lc = ti->private;
75 76
76 return lc->start + (bi_sector - ti->begin); 77 return lc->start + dm_target_offset(ti, bi_sector);
77} 78}
78 79
79static void linear_map_bio(struct dm_target *ti, struct bio *bio) 80static void linear_map_bio(struct dm_target *ti, struct bio *bio)