diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-06-22 10:12:22 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-06-22 10:12:22 +0100 |
commit | 433bcac5645508b71eab2710b6817c3ef937eba8 (patch) | |
tree | d2c1d8e9403d0f3e83c63085a9046f466de431c3 /drivers/md/dm-linear.c | |
parent | 52b1fd5a27c625c78373e024bf570af3c9d44a79 (diff) | |
download | kernel_samsung_tuna-433bcac5645508b71eab2710b6817c3ef937eba8.zip kernel_samsung_tuna-433bcac5645508b71eab2710b6817c3ef937eba8.tar.gz kernel_samsung_tuna-433bcac5645508b71eab2710b6817c3ef937eba8.tar.bz2 |
dm: linear support flush
Flush support for the linear target.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r-- | drivers/md/dm-linear.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 79fb53e..ecbb174 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) goto bad; } + ti->num_flush_requests = 1; ti->private = lc; return 0; @@ -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, |