diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2008-04-24 21:43:11 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2008-04-25 13:26:40 +0100 |
commit | 72727bad544b4ce0a3f7853bfd7ae939f398007d (patch) | |
tree | 97961bf4031c9fa1739f545e6030e8ab6cbf0ecc /drivers/md/dm-snap.c | |
parent | 769aef30f0f505c44bbe9fcd2c911a052a386139 (diff) | |
download | op-kernel-dev-72727bad544b4ce0a3f7853bfd7ae939f398007d.zip op-kernel-dev-72727bad544b4ce0a3f7853bfd7ae939f398007d.tar.gz |
dm snapshot: store pointer to target instance
Save pointer to dm_target in dm_snapshot structure.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r-- | drivers/md/dm-snap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 08047fb..08a8cbd 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c @@ -536,7 +536,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) s->last_percent = 0; init_rwsem(&s->lock); spin_lock_init(&s->pe_lock); - s->table = ti->table; + s->ti = ti; /* Allocate hash table for COW data */ if (init_hash_tables(s)) { @@ -699,7 +699,7 @@ static void __invalidate_snapshot(struct dm_snapshot *s, int err) s->valid = 0; - dm_table_event(s->table); + dm_table_event(s->ti->table); } static void get_pending_exception(struct dm_snap_pending_exception *pe) @@ -1060,7 +1060,7 @@ static int __origin_write(struct list_head *snapshots, struct bio *bio) goto next_snapshot; /* Nothing to do if writing beyond end of snapshot */ - if (bio->bi_sector >= dm_table_get_size(snap->table)) + if (bio->bi_sector >= dm_table_get_size(snap->ti->table)) goto next_snapshot; /* |