mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Fix miscalculation of device alignment offset.
device_topology_alignment routine already returns alignment offset in bytes. There's no need to divide it by sector size, since LUKS2 format have all offsets and sizes stored in bytes.
This commit is contained in:
committed by
Milan Broz
parent
0270fc66a1
commit
dd36d56d47
@@ -1602,7 +1602,7 @@ static int _crypt_format_luks2(struct crypt_device *cd,
|
||||
integrity, uuid,
|
||||
sector_size,
|
||||
required_alignment / sector_size,
|
||||
alignment_offset / sector_size,
|
||||
alignment_offset,
|
||||
cd->metadata_device ? 1 : 0);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user