Lines Matching refs:snap
21 #include "dm-snap.h"
71 * If incrementing or decrementing this, hold pe->snap->lock for
72 * the sibling concerned and not pe->primary_pe->snap->lock unless
78 struct dm_snapshot *snap;
168 static int register_snapshot(struct dm_snapshot *snap)
171 struct block_device *bdev = snap->origin->bdev;
191 list_add_tail(&snap->list, &o->snapshots);
504 s->store.snap = s;
698 struct dm_snapshot *s = pe->snap;
762 struct dm_snapshot *s = pe->snap;
778 struct dm_snapshot *s = pe->snap;
803 * NOTE: a write lock must be held on snap->lock before calling
848 pe->snap = s;
923 /* this is protected by snap->lock */
950 struct dm_snapshot *snap = (struct dm_snapshot *) ti->private;
954 if (!snap->valid)
957 if (snap->store.fraction_full) {
959 snap->store.fraction_full(&snap->store,
978 snap->origin->name, snap->cow->name,
979 snap->type,
980 (unsigned long long)snap->chunk_size);
993 struct dm_snapshot *snap;
1000 list_for_each_entry (snap, snapshots, list) {
1002 down_write(&snap->lock);
1005 if (!snap->valid || !snap->active)
1009 if (bio->bi_sector >= dm_table_get_size(snap->table))
1016 chunk = sector_to_chunk(snap, bio->bi_sector);
1026 e = lookup_exception(&snap->complete, chunk);
1030 pe = __find_pending_exception(snap, bio);
1032 __invalidate_snapshot(snap, -ENOMEM);
1064 up_write(&snap->lock);
1168 struct dm_snapshot *snap;
1175 list_for_each_entry (snap, &o->snapshots, list)
1176 chunk_size = min_not_zero(chunk_size, snap->chunk_size);