Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209158
b: refs/heads/master
c: b1d5552
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Aug 12, 2010
1 parent da6c77f commit 86005e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a0b4ddf261fc89c050fe0a10ec57a61251d7ac0
refs/heads/master: b1d5552838334c600b068c9c8cc18638e5a8cb47
16 changes: 16 additions & 0 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2171,6 +2171,21 @@ static int origin_status(struct dm_target *ti, status_type_t type, char *result,
return 0;
}

static int origin_merge(struct dm_target *ti, struct bvec_merge_data *bvm,
struct bio_vec *biovec, int max_size)
{
struct dm_dev *dev = ti->private;
struct request_queue *q = bdev_get_queue(dev->bdev);

if (!q->merge_bvec_fn)
return max_size;

bvm->bi_bdev = dev->bdev;
bvm->bi_sector = bvm->bi_sector;

return min(max_size, q->merge_bvec_fn(q, bvm, biovec));
}

static int origin_iterate_devices(struct dm_target *ti,
iterate_devices_callout_fn fn, void *data)
{
Expand All @@ -2188,6 +2203,7 @@ static struct target_type origin_target = {
.map = origin_map,
.resume = origin_resume,
.status = origin_status,
.merge = origin_merge,
.iterate_devices = origin_iterate_devices,
};

Expand Down

0 comments on commit 86005e5

Please sign in to comment.