diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 23:32:24 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 23:32:24 +0200 |
commit | a348a7e6fdbcd2d5192a09719a479bb238fde727 (patch) | |
tree | 5ff94185f4e5a810777469d7fe7832a8ec2d3430 /drivers/md/dm-linear.c | |
parent | dmaengine: at_hdmac: add DMA slave transfers (diff) | |
parent | Linux 2.6.31-rc1 (diff) | |
download | linux-a348a7e6fdbcd2d5192a09719a479bb238fde727.tar.xz linux-a348a7e6fdbcd2d5192a09719a479bb238fde727.zip |
Merge commit 'v2.6.31-rc1' into dmaengine
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r-- | drivers/md/dm-linear.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 79fb53e51c70..9184b6deb868 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, @@ -132,9 +134,17 @@ static int linear_merge(struct dm_target *ti, struct bvec_merge_data *bvm, return min(max_size, q->merge_bvec_fn(q, bvm, biovec)); } +static int linear_iterate_devices(struct dm_target *ti, + iterate_devices_callout_fn fn, void *data) +{ + struct linear_c *lc = ti->private; + + return fn(ti, lc->dev, lc->start, data); +} + static struct target_type linear_target = { .name = "linear", - .version= {1, 0, 3}, + .version = {1, 1, 0}, .module = THIS_MODULE, .ctr = linear_ctr, .dtr = linear_dtr, @@ -142,6 +152,7 @@ static struct target_type linear_target = { .status = linear_status, .ioctl = linear_ioctl, .merge = linear_merge, + .iterate_devices = linear_iterate_devices, }; int __init dm_linear_init(void) |