Lines Matching refs:origin
52 struct dm_dev *origin; member
174 return s->origin; in dm_snap_origin()
314 struct origin { struct
388 static struct origin *__lookup_origin(struct block_device *origin) in __lookup_origin() argument
391 struct origin *o; in __lookup_origin()
393 ol = &_origins[origin_hash(origin)]; in __lookup_origin()
395 if (bdev_equal(o->bdev, origin)) in __lookup_origin()
401 static void __insert_origin(struct origin *o) in __insert_origin()
408 static struct dm_origin *__lookup_dm_origin(struct block_device *origin) in __lookup_dm_origin() argument
413 ol = &_dm_origins[origin_hash(origin)]; in __lookup_dm_origin()
415 if (bdev_equal(o->dev->bdev, origin)) in __lookup_dm_origin()
454 struct origin *o; in __find_snapshots_sharing_cow()
458 o = __lookup_origin(snap->origin->bdev); in __find_snapshots_sharing_cow()
532 static void __insert_snapshot(struct origin *o, struct dm_snapshot *s) in __insert_snapshot()
553 struct origin *o, *new_o = NULL; in register_snapshot()
554 struct block_device *bdev = snap->origin->bdev; in register_snapshot()
596 struct block_device *bdev = s->origin->bdev; in reregister_snapshot()
608 struct origin *o; in unregister_snapshot()
611 o = __lookup_origin(s->origin->bdev); in unregister_snapshot()
855 static uint32_t __minimum_chunk_size(struct origin *o) in __minimum_chunk_size()
1084 dest.bdev = s->origin->bdev; in snapshot_merge_next_chunks()
1141 if (blkdev_issue_flush(s->origin->bdev) < 0) { in merge_callback()
1278 r = dm_get_device(ti, origin_path, origin_mode, &s->origin); in snapshot_ctr()
1293 if (s->cow->bdev && s->cow->bdev == s->origin->bdev) { in snapshot_ctr()
1418 dm_put_device(ti, s->origin); in snapshot_ctr()
1515 dm_put_device(ti, s->origin); in snapshot_dtr()
1583 static int do_origin(struct dm_dev *origin, struct bio *bio, bool limit);
1596 r = do_origin(s->origin, bio, false); in retry_origin_bios()
1798 struct block_device *bdev = s->origin->bdev; in start_copy()
1994 bio_set_dev(bio, s->origin->bdev); in snapshot_map()
2093 bio_set_dev(bio, s->origin->bdev); in snapshot_map()
2127 bio_set_dev(bio, s->origin->bdev); in snapshot_merge_map()
2155 bio_set_dev(bio, s->origin->bdev); in snapshot_merge_map()
2169 bio_set_dev(bio, s->origin->bdev); in snapshot_merge_map()
2173 return do_origin(s->origin, bio, false); in snapshot_merge_map()
2234 o = __lookup_dm_origin(s->origin->bdev); in snapshot_resume()
2310 ti->max_io_len = get_origin_minimum_chunksize(s->origin->bdev); in snapshot_merge_resume()
2359 DMEMIT("%s %s", snap->origin->name, snap->cow->name); in snapshot_status()
2374 DMEMIT(",snap_origin_name=%s", snap->origin->name); in snapshot_status()
2390 r = fn(ti, snap->origin, 0, ti->len, data); in snapshot_iterate_devices()
2556 static int do_origin(struct dm_dev *origin, struct bio *bio, bool limit) in do_origin() argument
2558 struct origin *o; in do_origin()
2563 o = __lookup_origin(origin->bdev); in do_origin()
2598 struct origin *o; in origin_write_extent()
2605 o = __lookup_origin(merging_snap->origin->bdev); in origin_write_extent()