Mark cachevol lv's as ignored features, which is true
only if they are configured as "writethrough". This patch
does not let grub boot from "writeback" cache-enabled lv's

Signed-off-by: Patrick Plenefisch <simonp...@gmail.com>
---
 grub-core/disk/lvm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
index abb5b12ae..02e359827 100644
--- a/grub-core/disk/lvm.c
+++ b/grub-core/disk/lvm.c
@@ -811,6 +811,8 @@ grub_lvm_detect (grub_disk_t disk,
            */
           else if (grub_strncmp (p, "cache\"",
                    sizeof ("cache\"") - 1) == 0
+                   || grub_strncmp (p, "cache+CACHE_USES_CACHEVOL\"",
+                   sizeof ("cache+CACHE_USES_CACHEVOL\"") - 1) == 0
                    || grub_strncmp (p, "integrity\"",
                    sizeof ("integrity\"") - 1) == 0)
             {
-- 
2.39.5
From 0b24c91dddc3a8ef039fd27eae7fbea56c05aee5 Mon Sep 17 00:00:00 2001
From: Patrick Plenefisch <simonp...@gmail.com>
Date: Mon, 11 Nov 2024 13:18:39 -0500
Subject: [PATCH 4/4] lvm: Add support for cachevol lv

Mark cachevol lv's as ignored features, which is true
only if they are configured as "writethrough". This patch
does not let grub boot from "writeback" cache-enabled lv's

Signed-off-by: Patrick Plenefisch <simonp...@gmail.com>
---
 grub-core/disk/lvm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
index abb5b12ae..02e359827 100644
--- a/grub-core/disk/lvm.c
+++ b/grub-core/disk/lvm.c
@@ -811,6 +811,8 @@ grub_lvm_detect (grub_disk_t disk,
 		   */
 		  else if (grub_strncmp (p, "cache\"",
 				   sizeof ("cache\"") - 1) == 0
+				   || grub_strncmp (p, "cache+CACHE_USES_CACHEVOL\"",
+				   sizeof ("cache+CACHE_USES_CACHEVOL\"") - 1) == 0
 				   || grub_strncmp (p, "integrity\"",
 				   sizeof ("integrity\"") - 1) == 0)
 		    {
-- 
2.39.5

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to