From 1d8b0bb7948753817706df3182096e4eb2968d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 13 Feb 2017 17:18:39 +0100 Subject: [PATCH] plugin_disk: Fix setting 'readahead_multiply' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provide the correct number of parameters to the '_set_readahead' method. This fixes a traceback when setting the 'readahead_multiply' option. I assume the 'sim' parameter to '_set_readahead' means 'simulated' (it is handled in that sense), so we should set the value to False, because we are actually enabling/disabling the tunning here. Signed-off-by: Ondřej Lysoněk --- tuned/plugins/plugin_disk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py index 5207dff..6dd6fb6 100644 --- a/tuned/plugins/plugin_disk.py +++ b/tuned/plugins/plugin_disk.py @@ -305,12 +305,12 @@ class DiskPlugin(hotplug.Plugin): return new_readahead = int(float(multiplier) * old_readahead) self._storage.set(storage_key, old_readahead) - self._set_readahead(new_readahead, device) + self._set_readahead(new_readahead, device, False) else: old_readahead = self._storage.get(storage_key) if old_readahead is None: return - self._set_readahead(old_readahead, device) + self._set_readahead(old_readahead, device, False) self._storage.unset(storage_key) def _scheduler_quantum_file(self, device):