mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 16:30:04 +01:00
Move checking for detached integrity metadata device.
To allow resizing integrity devices with detached metadata device, the check has to be moved from _compare_integrity_devices to _reload_device_with_integrity.
This commit is contained in:
@@ -2523,10 +2523,6 @@ static int _compare_integrity_devices(struct crypt_device *cd,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unsupported underneath dm-crypt with auth. encryption */
|
|
||||||
if (src->u.integrity.meta_device || tgt->u.integrity.meta_device)
|
|
||||||
return -ENOTSUP;
|
|
||||||
|
|
||||||
if (device_is_identical(src->data_device, tgt->data_device) <= 0) {
|
if (device_is_identical(src->data_device, tgt->data_device) <= 0) {
|
||||||
log_dbg(cd, "Data devices do not match.");
|
log_dbg(cd, "Data devices do not match.");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -2703,6 +2699,10 @@ static int _reload_device_with_integrity(struct crypt_device *cd,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* unsupported underneath dm-crypt with auth. encryption */
|
||||||
|
if (sdmdi->segment.u.integrity.meta_device || tdmdi.segment.u.integrity.meta_device)
|
||||||
|
return -ENOTSUP;
|
||||||
|
|
||||||
src = &sdmd->segment;
|
src = &sdmd->segment;
|
||||||
srci = &sdmdi->segment;
|
srci = &sdmdi->segment;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user