/* Callback used by the exception stores to load exceptions when initialising.  */
static int dm_add_exception(void *context, chunk_t old, chunk_t new)
/* Callback used by the exception stores to load exceptions when initialising.  */
static int dm_add_exception(void *context, chunk_t old, chunk_t new)
{
	struct dm_snapshot *s = context;
	struct dm_exception *e;
	e = alloc_completed_exception();
	if (!e)
		return -ENOMEM;
	e->old_chunk = old;
	e->new_chunk = new;
	dm_insert_exception(&s->complete, e);
	return 0;
}