• Home
  • Raw
  • Download

Lines Matching refs:e

195 	struct dm_exception e;  member
659 static void dm_remove_exception(struct dm_exception *e) in dm_remove_exception() argument
661 list_del(&e->hash_list); in dm_remove_exception()
672 struct dm_exception *e; in dm_lookup_exception() local
675 list_for_each_entry (e, slot, hash_list) in dm_lookup_exception()
676 if (chunk >= e->old_chunk && in dm_lookup_exception()
677 chunk <= e->old_chunk + dm_consecutive_chunk_count(e)) in dm_lookup_exception()
678 return e; in dm_lookup_exception()
685 struct dm_exception *e; in alloc_completed_exception() local
687 e = kmem_cache_alloc(exception_cache, gfp); in alloc_completed_exception()
688 if (!e && gfp == GFP_NOIO) in alloc_completed_exception()
689 e = kmem_cache_alloc(exception_cache, GFP_ATOMIC); in alloc_completed_exception()
691 return e; in alloc_completed_exception()
694 static void free_completed_exception(struct dm_exception *e) in free_completed_exception() argument
696 kmem_cache_free(exception_cache, e); in free_completed_exception()
723 struct dm_exception *e = NULL; in dm_insert_exception() local
732 list_for_each_entry_reverse(e, l, hash_list) { in dm_insert_exception()
734 if (new_e->old_chunk == (e->old_chunk + in dm_insert_exception()
735 dm_consecutive_chunk_count(e) + 1) && in dm_insert_exception()
736 new_e->new_chunk == (dm_chunk_number(e->new_chunk) + in dm_insert_exception()
737 dm_consecutive_chunk_count(e) + 1)) { in dm_insert_exception()
738 dm_consecutive_chunk_count_inc(e); in dm_insert_exception()
744 if (new_e->old_chunk == (e->old_chunk - 1) && in dm_insert_exception()
745 new_e->new_chunk == (dm_chunk_number(e->new_chunk) - 1)) { in dm_insert_exception()
746 dm_consecutive_chunk_count_inc(e); in dm_insert_exception()
747 e->old_chunk--; in dm_insert_exception()
748 e->new_chunk--; in dm_insert_exception()
753 if (new_e->old_chunk > e->old_chunk) in dm_insert_exception()
758 list_add(&new_e->hash_list, e ? &e->hash_list : l); in dm_insert_exception()
768 struct dm_exception *e; in dm_add_exception() local
770 e = alloc_completed_exception(GFP_KERNEL); in dm_add_exception()
771 if (!e) in dm_add_exception()
774 e->old_chunk = old; in dm_add_exception()
777 e->new_chunk = new; in dm_add_exception()
779 dm_insert_exception(&s->complete, e); in dm_add_exception()
874 struct dm_exception *e; in __remove_single_exception_chunk() local
876 e = dm_lookup_exception(&s->complete, old_chunk); in __remove_single_exception_chunk()
877 if (!e) { in __remove_single_exception_chunk()
887 if (!dm_consecutive_chunk_count(e)) { in __remove_single_exception_chunk()
888 dm_remove_exception(e); in __remove_single_exception_chunk()
889 free_completed_exception(e); in __remove_single_exception_chunk()
901 if (old_chunk == e->old_chunk) { in __remove_single_exception_chunk()
902 e->old_chunk++; in __remove_single_exception_chunk()
903 e->new_chunk++; in __remove_single_exception_chunk()
904 } else if (old_chunk != e->old_chunk + in __remove_single_exception_chunk()
905 dm_consecutive_chunk_count(e)) { in __remove_single_exception_chunk()
909 (unsigned long long)e->old_chunk, in __remove_single_exception_chunk()
911 e->old_chunk + dm_consecutive_chunk_count(e)); in __remove_single_exception_chunk()
915 dm_consecutive_chunk_count_dec(e); in __remove_single_exception_chunk()
1519 struct dm_exception *e; in pending_complete() local
1534 e = alloc_completed_exception(GFP_NOIO); in pending_complete()
1535 if (!e) { in pending_complete()
1541 *e = pe->e; in pending_complete()
1545 free_completed_exception(e); in pending_complete()
1551 __check_for_conflicting_io(s, pe->e.old_chunk); in pending_complete()
1557 dm_insert_exception(&s->complete, e); in pending_complete()
1560 dm_remove_exception(&pe->e); in pending_complete()
1591 s->store->type->commit_exception(s->store, &pe->e, !pe->copy_error, in complete_exception()
1646 src.sector = chunk_to_sector(s->store, pe->e.old_chunk); in start_copy()
1650 dest.sector = chunk_to_sector(s->store, pe->e.new_chunk); in start_copy()
1687 struct dm_exception *e = dm_lookup_exception(&s->pending, chunk); in __lookup_pending_exception() local
1689 if (!e) in __lookup_pending_exception()
1692 return container_of(e, struct dm_snap_pending_exception, e); in __lookup_pending_exception()
1715 pe->e.old_chunk = chunk; in __find_pending_exception()
1721 if (s->store->type->prepare_exception(s->store, &pe->e)) { in __find_pending_exception()
1728 dm_insert_exception(&s->pending, &pe->e); in __find_pending_exception()
1733 static void remap_exception(struct dm_snapshot *s, struct dm_exception *e, in remap_exception() argument
1738 chunk_to_sector(s->store, dm_chunk_number(e->new_chunk) + in remap_exception()
1739 (chunk - e->old_chunk)) + in remap_exception()
1745 struct dm_exception *e; in snapshot_map() local
1779 e = dm_lookup_exception(&s->complete, chunk); in snapshot_map()
1780 if (e) { in snapshot_map()
1781 remap_exception(s, e, bio, chunk); in snapshot_map()
1803 e = dm_lookup_exception(&s->complete, chunk); in snapshot_map()
1804 if (e) { in snapshot_map()
1806 remap_exception(s, e, bio, chunk); in snapshot_map()
1822 remap_exception(s, &pe->e, bio, chunk); in snapshot_map()
1869 struct dm_exception *e; in snapshot_merge_map() local
1893 e = dm_lookup_exception(&s->complete, chunk); in snapshot_merge_map()
1894 if (e) { in snapshot_merge_map()
1906 remap_exception(s, e, bio, chunk); in snapshot_merge_map()
2147 struct dm_exception *e; in __origin_write() local
2183 e = dm_lookup_exception(&snap->complete, chunk); in __origin_write()
2184 if (e) in __origin_write()
2198 e = dm_lookup_exception(&snap->complete, chunk); in __origin_write()
2199 if (e) { in __origin_write()