1 struct list_head {
2   struct list_head *next, *prev;
3 };
4 struct dm_exception {
5   struct list_head hash_list;
6   unsigned long long old_chunk;
7   unsigned long long new_chunk;
8 };
dm_lookup_exception(struct list_head * table,unsigned long long chunk)9 struct dm_exception *dm_lookup_exception(struct list_head *table, unsigned long long chunk) {
10   struct list_head *slot;
11   struct dm_exception *e;
12   slot = &table[0];
13   e = (struct dm_exception *)slot->next;
14   for (; &e->hash_list != (slot);)
15     if (chunk <= (e->new_chunk>>56))
16       return e;
17 }
18