cryptsetup/cryptsetup-2.8.7-reencrypt-update-internal-reencryption-error-state-d.patch
Kristina Hanicova c693d865ec Update to cryptsetup 2.8.6
- Update to cryptsetup 2.8.6
- Add upstream patches for jq test fixes
- Add upstream patches for reencryption error path improvements

Resolves: RHEL-163434
2026-05-12 14:33:00 +02:00

43 lines
1.4 KiB
Diff

From bccf4da7e5a3e7da40bf7bb8fedbe13147583d85 Mon Sep 17 00:00:00 2001
Message-ID: <bccf4da7e5a3e7da40bf7bb8fedbe13147583d85.1778441820.git.khanicov@redhat.com>
From: Ondrej Kozina <okozina@redhat.com>
Date: Wed, 10 Dec 2025 15:44:14 +0100
Subject: [PATCH] reencrypt: update internal reencryption error state
descriptions.
---
lib/luks2/luks2_reencrypt.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/lib/luks2/luks2_reencrypt.c b/lib/luks2/luks2_reencrypt.c
index 96749f7d..dcf349fe 100644
--- a/lib/luks2/luks2_reencrypt.c
+++ b/lib/luks2/luks2_reencrypt.c
@@ -840,7 +840,22 @@ static crypt_reencrypt_direction_info reencrypt_direction(struct luks2_hdr *hdr)
return di;
}
-typedef enum { REENC_OK = 0, REENC_ERR, REENC_ROLLBACK, REENC_FATAL } reenc_status_t;
+typedef enum { REENC_OK = 0,
+ /* to be removed in next commit */
+ REENC_ERR,
+ /*
+ * The state not requiring LUKS2 reencryption recovery. We can rollback
+ * to last known safe state (hold in memory since last metadata write)
+ * and teardown reencryption device stack (if used).
+ * The reencryption fails but does not require recovery
+ */
+ REENC_ROLLBACK,
+ /*
+ * Error while writing hotzone (short write or sync fail) or failed metadata
+ * update post hotzone write.
+ */
+ REENC_FATAL
+} reenc_status_t;
void LUKS2_reencrypt_protection_erase(struct reenc_protection *rp)
{
--
2.53.0