1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

cache: Disallow resizing of cache related LVs

For now, disallow lvextend/lvreduce/lvresize of cache LVs, cache
pool LVs, and cache pool sub-LVs.
This commit is contained in:
Jonathan Brassow 2014-02-24 10:19:50 -06:00
parent 46223c4284
commit f3d1debb18

View File

@ -4274,6 +4274,11 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
struct logical_volume *lock_lv = NULL;
int inactive = 0;
if (lv_is_cache_type(lv)) {
log_error("Unable to resize logical volumes of cache type.");
return 0;
}
if (lp->sizeargs &&
!(lock_lv = _lvresize_volume(cmd, lv, lp, pvh)))
return_0;