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

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