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:
parent
46223c4284
commit
f3d1debb18
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user