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>
s->last_percent = 0;
init_rwsem(&s->lock);
spin_lock_init(&s->pe_lock);
s->last_percent = 0;
init_rwsem(&s->lock);
spin_lock_init(&s->pe_lock);
/* Allocate hash table for COW data */
if (init_hash_tables(s)) {
/* Allocate hash table for COW data */
if (init_hash_tables(s)) {
- dm_table_event(s->table);
+ dm_table_event(s->ti->table);
}
static void get_pending_exception(struct dm_snap_pending_exception *pe)
}
static void get_pending_exception(struct dm_snap_pending_exception *pe)
goto next_snapshot;
/* Nothing to do if writing beyond end of snapshot */
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))
struct dm_snapshot {
struct rw_semaphore lock;
struct dm_snapshot {
struct rw_semaphore lock;
- struct dm_table *table;
struct dm_dev *origin;
struct dm_dev *cow;
struct dm_dev *origin;
struct dm_dev *cow;