diff --git a/0029-add-internal-error-for-missing-vg.patch b/0029-add-internal-error-for-missing-vg.patch new file mode 100644 index 0000000000000000000000000000000000000000..8cc008c0459ea7c136b422e14369f43fca3238ae --- /dev/null +++ b/0029-add-internal-error-for-missing-vg.patch @@ -0,0 +1,38 @@ +From 57ab219d9b2eea107b59b2fb7ef3bd114ca29b72 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Thu, 25 Apr 2024 23:51:58 +0200 +Subject: [PATCH] cov: validation + +Add internal error for missing vg. +--- + tools/pvmove.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/tools/pvmove.c b/tools/pvmove.c +index dd68e33d1..c5f9d545e 100644 +--- a/tools/pvmove.c ++++ b/tools/pvmove.c +@@ -620,6 +620,11 @@ static int _pvmove_setup_single(struct cmd_context *cmd, + unsigned exclusive; + int r = ECMD_FAILED; + ++ if (!vg) { ++ log_error(INTERNAL_ERROR "Missing volume group."); ++ return r; ++ } ++ + pp->found_pv = 1; + pp->setup_result = ECMD_FAILED; + +@@ -754,6 +759,11 @@ static int _pvmove_read_single(struct cmd_context *cmd, + struct logical_volume *lv; + int ret = ECMD_FAILED; + ++ if (!vg) { ++ log_error(INTERNAL_ERROR "Missing volume group."); ++ return ret; ++ } ++ + pp->found_pv = 1; + + if (!(lv = find_pvmove_lv(vg, pv_dev(pv), PVMOVE))) { diff --git a/lvm2.spec b/lvm2.spec index 40b2d82b7c7e8fd902a46a7f38a2af53d44cb911..c4ba03136a3a9d8a2b1222a873318d839738102a 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -43,7 +43,7 @@ Name: lvm2 Version: 2.03.21 -Release: 19 +Release: 20 Epoch: 8 Summary: Tools for logical volume management License: GPLv2+ and LGPLv2.1 and BSD @@ -77,6 +77,7 @@ Patch25: 0025-fix-multiple-mounts-in-lvextend.patch Patch26: 0026-fix-pv_major-and-pv_minor-report-field-type.patch Patch27: 0027-vgsplit-fix-check-for-not-splitting-an-LV-between-tw.patch Patch28: 0028-vgsplit-fix-check-for-not-splitting-an-LV-between-tw.patch +Patch29: 0029-add-internal-error-for-missing-vg.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -503,6 +504,9 @@ fi %changelog +* Wed Nov 12 2025 weishuaihao - 8:2.03.21-20 +- add internal error for missing vg + * Mon Nov 10 2025 liuh - 8:2.03.21-19 - vgsplit: fix check for not splitting an LV between two VGs for cachevol