Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157215
b: refs/heads/master
c: 8811f46
h: refs/heads/master
i:
  157213: 9dd3359
  157211: c0d5191
  157207: 7b975d6
  157199: 15b9343
  157183: c641daa
v: v3
  • Loading branch information
Mike Snitzer authored and Alasdair G Kergon committed Sep 4, 2009
1 parent f736ddb commit 010968d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a77e28c7e1dc1a6a035c7627d4a88ecf3ea09aea
refs/heads/master: 8811f46c1f9386fc7017150de9d52359e5b1826e
23 changes: 21 additions & 2 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,15 @@ static int snapshot_status(struct dm_target *ti, status_type_t type,
return 0;
}

static int snapshot_iterate_devices(struct dm_target *ti,
iterate_devices_callout_fn fn, void *data)
{
struct dm_snapshot *snap = ti->private;

return fn(ti, snap->origin, 0, ti->len, data);
}


/*-----------------------------------------------------------------
* Origin methods
*---------------------------------------------------------------*/
Expand Down Expand Up @@ -1410,27 +1419,37 @@ static int origin_status(struct dm_target *ti, status_type_t type, char *result,
return 0;
}

static int origin_iterate_devices(struct dm_target *ti,
iterate_devices_callout_fn fn, void *data)
{
struct dm_dev *dev = ti->private;

return fn(ti, dev, 0, ti->len, data);
}

static struct target_type origin_target = {
.name = "snapshot-origin",
.version = {1, 6, 0},
.version = {1, 7, 0},
.module = THIS_MODULE,
.ctr = origin_ctr,
.dtr = origin_dtr,
.map = origin_map,
.resume = origin_resume,
.status = origin_status,
.iterate_devices = origin_iterate_devices,
};

static struct target_type snapshot_target = {
.name = "snapshot",
.version = {1, 6, 0},
.version = {1, 7, 0},
.module = THIS_MODULE,
.ctr = snapshot_ctr,
.dtr = snapshot_dtr,
.map = snapshot_map,
.end_io = snapshot_end_io,
.resume = snapshot_resume,
.status = snapshot_status,
.iterate_devices = snapshot_iterate_devices,
};

static int __init dm_snapshot_init(void)
Expand Down

0 comments on commit 010968d

Please sign in to comment.