|
@@ -3009,8 +3009,13 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
|
|
|
|
|
|
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
|
|
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
|
|
{
|
|
{
|
|
- if (from_cblock(new_size) > from_cblock(cache->cache_size))
|
|
|
|
- return true;
|
|
|
|
|
|
+ if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
|
|
|
|
+ if (cache->sized) {
|
|
|
|
+ DMERR("%s: unable to extend cache due to missing cache table reload",
|
|
|
|
+ cache_device_name(cache));
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
/*
|
|
* We can't drop a dirty block when shrinking the cache.
|
|
* We can't drop a dirty block when shrinking the cache.
|