1 Star 0 Fork 21

langfei/tuned

forked from src-openEuler/tuned 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0074-fix-disk-plugin-plugout-problem.patch 1019 Bytes
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 11:18 . Package init
From a2219675f29fae94540868bf63f36f62c61b92c7 Mon Sep 17 00:00:00 2001
From: Tomas Korbar <tkorbar@redhat.com>
Date: Wed, 12 Dec 2018 14:48:09 +0100
Subject: [PATCH 074/124] fix disk plugin/plugout problem
when udev sends remove event it does not send any device
attributes with it so _device_is_supported check must be omitted
Resolves: rhbz#1595156
---
tuned/plugins/plugin_disk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py
index 1de1257..56e56f4 100644
--- a/tuned/plugins/plugin_disk.py
+++ b/tuned/plugins/plugin_disk.py
@@ -50,7 +50,7 @@ class DiskPlugin(hotplug.Plugin):
self._hardware_inventory.unsubscribe(self)
def _hardware_events_callback(self, event, device):
- if self._device_is_supported(device):
+ if self._device_is_supported(device) or event == "remove":
super(DiskPlugin, self)._hardware_events_callback(event, device)
def _added_device_apply_tuning(self, instance, device_name):
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/langfei295455/tuned.git
git@gitee.com:langfei295455/tuned.git
langfei295455
tuned
tuned
openEuler-20.03-LTS-SP2

搜索帮助