diff options
-rw-r--r-- | drivers/md/dm-flakey.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c index ea790623c30b..70a69b2f93d2 100644 --- a/drivers/md/dm-flakey.c +++ b/drivers/md/dm-flakey.c | |||
@@ -79,6 +79,7 @@ static int flakey_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | ti->num_flush_requests = 1; | 81 | ti->num_flush_requests = 1; |
82 | ti->num_discard_requests = 1; | ||
82 | ti->private = fc; | 83 | ti->private = fc; |
83 | return 0; | 84 | return 0; |
84 | 85 | ||
@@ -99,7 +100,7 @@ static sector_t flakey_map_sector(struct dm_target *ti, sector_t bi_sector) | |||
99 | { | 100 | { |
100 | struct flakey_c *fc = ti->private; | 101 | struct flakey_c *fc = ti->private; |
101 | 102 | ||
102 | return fc->start + (bi_sector - ti->begin); | 103 | return fc->start + dm_target_offset(ti, bi_sector); |
103 | } | 104 | } |
104 | 105 | ||
105 | static void flakey_map_bio(struct dm_target *ti, struct bio *bio) | 106 | static void flakey_map_bio(struct dm_target *ti, struct bio *bio) |