mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Set loopback sector size according to verity block sizes.
Verity block size has the same limits, so we can optimize loop device this way.
This commit is contained in:
@@ -112,6 +112,10 @@ int VERITY_read_sb(struct crypt_device *cd,
|
||||
}
|
||||
params->data_size = le64_to_cpu(sb.data_blocks);
|
||||
|
||||
/* Update block size to be used for loop devices */
|
||||
device_set_block_size(crypt_metadata_device(cd), params->hash_block_size);
|
||||
device_set_block_size(crypt_data_device(cd), params->data_block_size);
|
||||
|
||||
params->hash_name = strndup((const char*)sb.algorithm, sizeof(sb.algorithm));
|
||||
if (!params->hash_name)
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user