Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
[deliverable/linux.git] / drivers / md / dm-linear.c
index 9200dbf2391a7934c11314fe3e91ce90275852f4..3921e3bb43c15a107c90e4769fa682b1041d9a7a 100644 (file)
@@ -53,6 +53,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv)
        }
 
        ti->num_flush_requests = 1;
+       ti->num_discard_requests = 1;
        ti->private = lc;
        return 0;
 
@@ -73,7 +74,7 @@ static sector_t linear_map_sector(struct dm_target *ti, sector_t bi_sector)
 {
        struct linear_c *lc = ti->private;
 
-       return lc->start + (bi_sector - ti->begin);
+       return lc->start + dm_target_offset(ti, bi_sector);
 }
 
 static void linear_map_bio(struct dm_target *ti, struct bio *bio)
This page took 0.024979 seconds and 5 git commands to generate.