1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Revert "lvresize: enable crypt resizing with --force"

It looks like force was not being used to enable crypt resize,
but rather to force an inconsistency between LV and crypt
sizes, so this is either not needed or force in this case
should have some other meaning.

This reverts commit ed808a9b54.
This commit is contained in:
David Teigland 2023-01-25 09:30:05 -06:00
parent 49c650423a
commit 8adfcddc35

View File

@ -6417,14 +6417,10 @@ static int _fs_reduce(struct cmd_context *cmd, struct logical_volume *lv,
goto out;
}
if (!strcmp(lp->fsopt, "checksize")) {
if (!lp->force) {
log_error("crypt reduce is required (see --resizefs or cryptsetup resize.)");
ret = 0;
goto out;
}
/* This is only because it has been allowed in the past. */
log_print("Forcing cryptsetup resize (--resizefs preferred.)");
}
if (test_mode()) {
ret = 1;
goto_out;