|
@@ -725,17 +725,16 @@ static int calc_max_buckets(void)
|
|
|
*/
|
|
|
static int init_hash_tables(struct dm_snapshot *s)
|
|
|
{
|
|
|
- sector_t hash_size, cow_dev_size, origin_dev_size, max_buckets;
|
|
|
+ sector_t hash_size, cow_dev_size, max_buckets;
|
|
|
|
|
|
/*
|
|
|
* Calculate based on the size of the original volume or
|
|
|
* the COW volume...
|
|
|
*/
|
|
|
cow_dev_size = get_dev_size(s->cow->bdev);
|
|
|
- origin_dev_size = get_dev_size(s->origin->bdev);
|
|
|
max_buckets = calc_max_buckets();
|
|
|
|
|
|
- hash_size = min(origin_dev_size, cow_dev_size) >> s->store->chunk_shift;
|
|
|
+ hash_size = cow_dev_size >> s->store->chunk_shift;
|
|
|
hash_size = min(hash_size, max_buckets);
|
|
|
|
|
|
if (hash_size < 64)
|