mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Optimize LUKS2 metadata writes.
LUKS2 supports several jsom area length configurations. With the largest size supported in megabytes we do not want to write full metadata area unconditionaly (current code) with every metadata update. This might generate noticeble overhead with LUKS2 reencryption. With this patch we write only the real used json area length plus necessary padding to overwrite remaining previous metadata stored on the disk. During LUKS2 format and LUKS2 autorecovery we always overwrite whole json metadata area no matter the used size.
This commit is contained in:
committed by
Milan Broz
parent
000f03ad31
commit
cb0f568932
@@ -111,6 +111,7 @@ struct luks2_hdr {
|
||||
char uuid[LUKS2_UUID_L];
|
||||
void *jobj;
|
||||
void *jobj_rollback;
|
||||
size_t on_disk_json_end_offset;
|
||||
};
|
||||
|
||||
struct luks2_keyslot_params {
|
||||
|
||||
Reference in New Issue
Block a user