/* Implementation of the exception hash tables. The lowest hash_shift bits of the chunk number are ignored, allowing some consecutive chunks to be grouped together.  */
static int dm_exception_table_init(struct dm_exception_table *et, uint32_t size, unsigned hash_shift)
/* Implementation of the exception hash tables. The lowest hash_shift bits of the chunk number are ignored, allowing some consecutive chunks to be grouped together.  */
static int dm_exception_table_init(struct dm_exception_table *et, uint32_t size, unsigned hash_shift)
{
	unsigned int i;
	et->hash_shift = hash_shift;
	et->hash_mask = size - 1;
	et->table = dm_vcalloc(size, sizeof(struct list_head));
	if (!et->table)
		return -ENOMEM;
	for (i = 0; i < size; i++)
		INIT_LIST_HEAD(et->table + i);
	return 0;
}