1 Star 0 Fork 35

dpd/criu_1

forked from src-openEuler/criu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0048-fds-fix-fds-list-restore.patch 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
river 提交于 2022-04-13 15:05 . criu: backport kinds of features/bugfix
From 803ee02298e0a71b07cf611eee68e23f702d259e Mon Sep 17 00:00:00 2001
From: Jingxian He <hejingxian@huawei.com>
Date: Thu, 16 Sep 2021 13:50:46 +0000
Subject: [PATCH 48/72] fds: fix fds list restore
When there exist multi processes need to dump, the child process may
have the same fds as parent process. During the restore processing,
criu choose the process which has the min pid value to be the master
process to recover fds. However, choosing the parent process as the
master process is more suitable.
Signed-off-by: Jingxian He <hejingxian@huawei.com>
---
criu/files.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/criu/files.c b/criu/files.c
index 24ed219..6d8b812 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -906,12 +906,7 @@ static struct fdinfo_list_entry *alloc_fle(int pid, FdinfoEntry *fe)
static void __collect_desc_fle(struct fdinfo_list_entry *new_le, struct file_desc *fdesc)
{
- struct fdinfo_list_entry *le;
-
- list_for_each_entry_reverse(le, &fdesc->fd_info_head, desc_list)
- if (pid_rst_prio_eq(le->pid, new_le->pid))
- break;
- list_add(&new_le->desc_list, &le->desc_list);
+ list_add(&new_le->desc_list, &fdesc->fd_info_head);
}
static void collect_desc_fle(struct fdinfo_list_entry *new_le, struct file_desc *fdesc, bool force_master)
--
2.34.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dpdwaj/criu_1.git
git@gitee.com:dpdwaj/criu_1.git
dpdwaj
criu_1
criu_1
master

搜索帮助