mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 03:10:08 +01:00
Clarify LUKS2 error message related to reencryption.
Original messages could evoke reencryption is currently in progress. That was inaccurate because code only detected flag marking such device is in transition state from metadata pov. We should not imply anything about running processes. That's detected via reencryption locks.
This commit is contained in:
@@ -2340,9 +2340,9 @@ int LUKS2_unmet_requirements(struct crypt_device *cd, struct luks2_hdr *hdr, uin
|
||||
reqs &= ~reqs_mask;
|
||||
|
||||
if (reqs_reencrypt(reqs) && !quiet)
|
||||
log_err(cd, _("Offline reencryption in progress. Aborting."));
|
||||
log_err(cd, _("Operation incompatible with device marked for legacy reencryption. Aborting."));
|
||||
if (reqs_reencrypt_online(reqs) && !quiet)
|
||||
log_err(cd, _("Online reencryption in progress. Aborting."));
|
||||
log_err(cd, _("Operation incompatible with device marked for LUKS2 reencryption. Aborting."));
|
||||
|
||||
/* any remaining unmasked requirement fails the check */
|
||||
return reqs ? -EINVAL : 0;
|
||||
|
||||
@@ -2531,7 +2531,7 @@ static int reencrypt_load(struct crypt_device *cd, struct luks2_hdr *hdr,
|
||||
else if (ri == CRYPT_REENCRYPT_CRASH)
|
||||
r = reencrypt_load_crashed(cd, hdr, device_size, &tmp);
|
||||
else if (ri == CRYPT_REENCRYPT_NONE) {
|
||||
log_err(cd, _("No LUKS2 reencryption in progress."));
|
||||
log_err(cd, _("Device not marked for LUKS2 reencryption."));
|
||||
return -EINVAL;
|
||||
} else
|
||||
r = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user