Skip to content

Commit

Permalink
dm: linear support flush
Browse files Browse the repository at this point in the history
Flush support for the linear target.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Mikulas Patocka authored and kergon committed Jun 22, 2009
1 parent 52b1fd5 commit 433bcac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/md/dm-linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv)
goto bad;
}

ti->num_flush_requests = 1;
ti->private = lc;
return 0;

Expand Down Expand Up @@ -81,7 +82,8 @@ static void linear_map_bio(struct dm_target *ti, struct bio *bio)
struct linear_c *lc = ti->private;

bio->bi_bdev = lc->dev->bdev;
bio->bi_sector = linear_map_sector(ti, bio->bi_sector);
if (bio_sectors(bio))
bio->bi_sector = linear_map_sector(ti, bio->bi_sector);
}

static int linear_map(struct dm_target *ti, struct bio *bio,
Expand Down

0 comments on commit 433bcac

Please sign in to comment.