Blame SOURCES/cryptsetup-2.0.5-fix-miscalculation-of-device-alignment-offset.patch

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