From 468c12502e7ef2ada570e2585246458585af3829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 16 Jun 2015 16:54:43 +0200 Subject: [PATCH] plugin_disk: disabled both set_apm, set_spindown if there is no hdparm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- tuned/plugins/plugin_disk.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py index 6d700c7..a70e772 100644 --- a/tuned/plugins/plugin_disk.py +++ b/tuned/plugins/plugin_disk.py @@ -113,8 +113,9 @@ class DiskPlugin(hotplug.Plugin): if rc == 0: cnt = 0 elif rc == errno.ENOENT: - cnt = consts.ERROR_THRESHOLD + 1 - log.info("hdparm command not found, ignoring future set_%s commands" % s) + self._spindown_errcnt = self._apm_errcnt = consts.ERROR_THRESHOLD + 1 + log.info("hdparm command not found, ignoring future set_apm / set_spindown commands") + return else: cnt += 1 if cnt == consts.ERROR_THRESHOLD: