tuned/tuned-2.8.0-plugin-disk-traceback-fix.patch

26 lines
1.1 KiB
Diff

From b776b7420cca949bf1e1e128e2cbbc9348d2345c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
Date: Mon, 24 Jul 2017 16:42:28 +0200
Subject: [PATCH] disk: Fix traceback in dynamic tuning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
---
tuned/plugins/plugin_disk.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py
index f91bd4e..22721d5 100644
--- a/tuned/plugins/plugin_disk.py
+++ b/tuned/plugins/plugin_disk.py
@@ -180,6 +180,7 @@ def _instance_update_dynamic(self, instance, device):
(rc, out) = self._cmd.execute(["hdparm", "-B%d" % new_power_level, "/dev/%s" % device], no_errors = [errno.ENOENT])
self._update_errcnt(rc, False)
elif instance._spindown_change_delayed[device] and self._drive_spinning(device):
+ new_spindown_level = self._spindown_levels[idle["level"]]
self._change_spindown(instance, device, new_spindown_level)
log.debug("%s load: read %0.2f, write %0.2f" % (device, stats["read"], stats["write"]))