mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 04:10:06 +01:00
Pass device size inside reencryption parameters in sectors.
it was mistake in reencryption API. All other device sizes related to device mapper devices are always in 512b setctors.
This commit is contained in:
@@ -2547,7 +2547,7 @@ static int action_reencrypt_load(struct crypt_device *cd)
|
||||
.resilience = opt_resilience_mode,
|
||||
.hash = opt_resilience_hash,
|
||||
.max_hotzone_size = opt_hotzone_size,
|
||||
.device_size = opt_device_size,
|
||||
.device_size = opt_device_size / SECTOR_SIZE,
|
||||
.flags = CRYPT_REENCRYPT_RESUME_ONLY
|
||||
};
|
||||
|
||||
@@ -2591,7 +2591,7 @@ static int action_encrypt_luks2(struct crypt_device **cd)
|
||||
.resilience = opt_resilience_mode,
|
||||
.hash = opt_resilience_hash,
|
||||
.max_hotzone_size = opt_hotzone_size,
|
||||
.device_size = opt_device_size,
|
||||
.device_size = opt_device_size / SECTOR_SIZE,
|
||||
.luks2 = &luks2_params,
|
||||
.flags = CRYPT_REENCRYPT_INITIALIZE_ONLY
|
||||
};
|
||||
@@ -2753,7 +2753,7 @@ static int action_decrypt_luks2(struct crypt_device *cd)
|
||||
.resilience = opt_data_shift ? "datashift" : opt_resilience_mode,
|
||||
.hash = opt_resilience_hash,
|
||||
.data_shift = imaxabs(opt_data_shift) / SECTOR_SIZE,
|
||||
.device_size = opt_device_size,
|
||||
.device_size = opt_device_size / SECTOR_SIZE,
|
||||
.max_hotzone_size = opt_hotzone_size,
|
||||
};
|
||||
size_t passwordLen;
|
||||
@@ -2967,7 +2967,7 @@ static int action_reencrypt_luks2(struct crypt_device *cd)
|
||||
.hash = opt_resilience_hash,
|
||||
.data_shift = imaxabs(opt_data_shift) / SECTOR_SIZE,
|
||||
.max_hotzone_size = opt_hotzone_size,
|
||||
.device_size = opt_device_size,
|
||||
.device_size = opt_device_size / SECTOR_SIZE,
|
||||
.luks2 = &luks2_params,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user