Blame SOURCES/cryptsetup-2.0.5-fix-miscalculation-of-device-alignment-offset.patch
|
|
7cdc99 |
From dd36d56d472e1ea1db74d64d2e6a8d8ece2e7a76 Mon Sep 17 00:00:00 2001
|
|
|
7cdc99 |
From: Ondrej Kozina <okozina@redhat.com>
|
|
|
7cdc99 |
Date: Thu, 9 Aug 2018 10:26:38 +0200
|
|
|
7cdc99 |
Subject: [PATCH] Fix miscalculation of device alignment offset.
|
|
|
7cdc99 |
|
|
|
7cdc99 |
device_topology_alignment routine already returns alignment offset
|
|
|
7cdc99 |
in bytes. There's no need to divide it by sector size, since LUKS2
|
|
|
7cdc99 |
format have all offsets and sizes stored in bytes.
|
|
|
7cdc99 |
---
|
|
|
7cdc99 |
lib/setup.c | 2 +-
|
|
|
7cdc99 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
7cdc99 |
|
|
|
7cdc99 |
diff --git a/lib/setup.c b/lib/setup.c
|
|
|
7cdc99 |
index ff944c9..1a78d2e 100644
|
|
|
7cdc99 |
--- a/lib/setup.c
|
|
|
7cdc99 |
+++ b/lib/setup.c
|
|
|
7cdc99 |
@@ -1602,7 +1602,7 @@ static int _crypt_format_luks2(struct crypt_device *cd,
|
|
|
7cdc99 |
integrity, uuid,
|
|
|
7cdc99 |
sector_size,
|
|
|
7cdc99 |
required_alignment / sector_size,
|
|
|
7cdc99 |
- alignment_offset / sector_size,
|
|
|
7cdc99 |
+ alignment_offset,
|
|
|
7cdc99 |
cd->metadata_device ? 1 : 0);
|
|
|
7cdc99 |
if (r < 0)
|
|
|
7cdc99 |
goto out;
|
|
|
7cdc99 |
--
|
|
|
7cdc99 |
1.8.3.1
|
|
|
7cdc99 |
|