mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Suspend and resume also dm-integrity device with AEAD.
Currently we suspend top-level device only. With OPAL, the underlying device will start to return errors once OPAL LR is locked. If the dm-integrity device is not suspended, regular journal flush corrupts the device (journal write failure), corrupting data above it. Suspending the whole stack should fix the issue.
This commit is contained in:
@@ -3041,6 +3041,18 @@ const char *dm_get_dir(void)
|
||||
return dm_dir();
|
||||
}
|
||||
|
||||
int dm_get_iname(const char *name, char **iname, bool with_path)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (with_path)
|
||||
r = asprintf(iname, "%s/%s_dif", dm_get_dir(), name);
|
||||
else
|
||||
r = asprintf(iname, "%s_dif", name);
|
||||
|
||||
return r < 0 ? -ENOMEM : 0;
|
||||
}
|
||||
|
||||
int dm_is_dm_device(int major)
|
||||
{
|
||||
return dm_is_dm_major((uint32_t)major);
|
||||
|
||||
Reference in New Issue
Block a user