!109 fix hungtask in dm code
From: @foolstrong Reviewed-by: @wguanghao, @swf504 Signed-off-by: @swf504
This commit is contained in:
commit
172f6a2537
30
0015-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch
Normal file
30
0015-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
|
||||
Version: 2.03.21
|
||||
Release: 1
|
||||
Release: 2
|
||||
Epoch: 8
|
||||
Summary: Tools for logical volume management
|
||||
License: GPLv2+ and LGPLv2.1 and BSD
|
||||
@ -63,6 +63,7 @@ Patch11: 0011-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch
|
||||
Patch12: 0012-lvm-code-reduce-cyclomatic-complexity.patch
|
||||
Patch13: 0013-udev-repeat.patch
|
||||
Patch14: 0014-use-sync-io-read-bcache-by-defaults.patch
|
||||
Patch15: 0015-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -489,6 +490,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 5 2023 wangzhiqiang <wangzhiqiang95@huawei.com> - 8:2.03.21-2
|
||||
- fix hungtask in dm code
|
||||
|
||||
* Sat Jul 29 2023 wangzhiqiang <wangzhiqiang95@huawei.com> - 8:2.03.21-1
|
||||
- upgrade version to 2.03.21
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user