mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Following API calls trigerred LUKS2 metadata reload from storage in case of failure: crypt_convert crypt_keyslot_add_by_key crypt_keyslot_add_by_keyfile_device_offset crypt_keyslot_add_by_passphrase crypt_keyslot_change_by_passphrase crypt_reencrypt_init_by_keyring crypt_reencrypt_init_by_passphrase This patch replaces LUKS2 metadata reload with backup LUKS2 metadata copy kept in memory that is updated on each sucessfull metadata write and rolled back to it whenever needed in any of those calls listed above.