Skip to contentSkip to conversation

LVM cachevol support

PATCH New Scottie Shore 1 participant 2 messages Sep 30, 2024

lore
Share & tools
lore
#0 lore raw

cover LVM cachevol support

Sorry for missing patch. Still getting the hang of git send-email.

Short patch to support LVM cachevol, LVs with segment type "cache+CACHE_USES_CACHEVOL". This extends existing cachepool support.

The +suffix format is described as a status flag here:
https://gitlab.com/lvmteam/lvm2/-/blob/main/lib/format_text/flags.c#L238

I've kept the match simple and in the style of the code around it. There's a need for dedicated functions to iterate through the LVM MDA, but that's a much larger scope.

I've compiled and tested this change. Before, grub's "ls" does not show my LV with cachevol, and grub-probe detects it as an "unknown LVM type". After, I'm able to boot with grub's root on an LV with cachevol.

Scottie Shore (1):
Detect cachevol LVs

 grub-core/disk/lvm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Signature · 7 lines
2.43.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH 1/1 Detect cachevol LVs

---
 grub-core/disk/lvm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
grub-core/disk/lvm.c +4 -1
index 0c32c95f9..661280d3d 100644
@@ -808,7 +808,10 @@ grub_lvm_detect (grub_disk_t disk,
 			}
 		    }
 		  else if (grub_memcmp (p, "cache\"",
-				   sizeof ("cache\"") - 1) == 0)
+					sizeof ("cache\"") - 1) == 0 ||
+			   grub_memcmp (p, "cache+CACHE_USES_CACHEVOL\"",
+					sizeof ("cache+CACHE_USES_CACHEVOL\"")
+					- 1) == 0)
 		    {
 		      struct cache_lv *cache = NULL;
 
Signature · 7 lines
2.43.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel