diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-13 19:59:15 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-13 19:59:15 -0400 |
commit | 7d72e6fa56c4100b9669efe0044f77ed9eb785a1 (patch) | |
tree | 5e90bf4969809a1ab20b97432b85be20ccfaa1f4 /drivers/md/dm-linear.c | |
parent | ba00376b0b13f234d839541a7b36a5bf5c2a4036 (diff) | |
parent | 2be1f3a73dd02e38e181cf5abacb3d45a6a2d6b8 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r-- | drivers/md/dm-linear.c | 3 |
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 | ||
79 | static void linear_map_bio(struct dm_target *ti, struct bio *bio) | 80 | static void linear_map_bio(struct dm_target *ti, struct bio *bio) |