10 Star 3 Fork 40

src-openEuler/lvm2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0015-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch 912 Bytes
一键复制 编辑 原始数据 按行查看 历史
wangzhiqiang 提交于 2023-09-05 20:20 . fix hungtask in dm code
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/lvm2.git
git@gitee.com:src-openeuler/lvm2.git
src-openeuler
lvm2
lvm2
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385