vgchange: acquire an exclusive VG lock for refresh
Signed-off-by: wangzhiqiang <wangzhiqiang95@huawei.com> (cherry picked from commit e1e03956638b111cc8a9e9430bb798a372a5e765)
This commit is contained in:
parent
612e43e20b
commit
817359b9f1
30
0028-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch
Normal file
30
0028-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 65d23a1d75013f328e9a3a1914484514621822ef Mon Sep 17 00:00:00 2001
|
||||||
|
From: wangzhiqiang <wangzhiqiang95@huawei.com>
|
||||||
|
Date: Wed, 30 Aug 2023 15:47:42 -0500
|
||||||
|
Subject: [PATCH] vgchange: acquire an exclusive VG lock for refresh
|
||||||
|
|
||||||
|
Concurrent vgchange --refresh commands can lead to hung
|
||||||
|
tasks in dm code.
|
||||||
|
|
||||||
|
Signed-off-by: wangzhiqiang <wangzhiqiang95@huawei.com>
|
||||||
|
---
|
||||||
|
tools/vgchange.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/vgchange.c b/tools/vgchange.c
|
||||||
|
index e2d3dad02..8c1d605c6 100644
|
||||||
|
--- a/tools/vgchange.c
|
||||||
|
+++ b/tools/vgchange.c
|
||||||
|
@@ -1008,7 +1008,8 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
|
||||||
|
|
||||||
|
if (update)
|
||||||
|
flags |= READ_FOR_UPDATE;
|
||||||
|
- else if (arg_is_set(cmd, activate_ARG))
|
||||||
|
+ else if (arg_is_set(cmd, activate_ARG) ||
|
||||||
|
+ arg_is_set(cmd, refresh_ARG))
|
||||||
|
flags |= READ_FOR_ACTIVATE;
|
||||||
|
|
||||||
|
if (!(handle = init_processing_handle(cmd, NULL))) {
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
Name: lvm2
|
Name: lvm2
|
||||||
Version: 2.03.09
|
Version: 2.03.09
|
||||||
Release: 17
|
Release: 18
|
||||||
Epoch: 8
|
Epoch: 8
|
||||||
Summary: Tools for logical volume management
|
Summary: Tools for logical volume management
|
||||||
License: GPLv2+ and LGPLv2.1 and BSD
|
License: GPLv2+ and LGPLv2.1 and BSD
|
||||||
@ -76,6 +76,7 @@ Patch24: 0024-udev-import-previous-results-of-blkid-when-in-suspen.patch
|
|||||||
patch25: 0025-toollib-fix-segfault-if-using-S-select-with-log-repo.patch
|
patch25: 0025-toollib-fix-segfault-if-using-S-select-with-log-repo.patch
|
||||||
Patch26: 0026-dm-event-release-buffer-on-dm_event_get_version.patch
|
Patch26: 0026-dm-event-release-buffer-on-dm_event_get_version.patch
|
||||||
patch27: 0027-clean-up-group-struct-in-_stats_create_group-error-path.patch
|
patch27: 0027-clean-up-group-struct-in-_stats_create_group-error-path.patch
|
||||||
|
Patch28: 0028-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -501,6 +502,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 22 2024 wangzhiqiang <wangzhiqiang95@huawei.com> - 8:2.03.09-18
|
||||||
|
- vgchange: acquire an exclusive VG lock for refresh
|
||||||
|
|
||||||
* Tue Dec 19 2023 wuyifeng <wuyifeng10@huawei.com> - 8:2.03.09-17
|
* Tue Dec 19 2023 wuyifeng <wuyifeng10@huawei.com> - 8:2.03.09-17
|
||||||
- fix an double free in the error path from _stats_creat_group
|
- fix an double free in the error path from _stats_creat_group
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user