1
0
Fork 0

norefs, disk: fix spindown value setting

This commit is contained in:
Jan Vcelak 2012-11-27 17:26:01 +01:00
parent 0501e1461e
commit 10f723780a
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,6 @@ import base
from decorators import *
import tuned.logs
import tuned.utils.commands
import os
log = tuned.logs.get()
@ -191,12 +190,12 @@ class DiskPlugin(base.Plugin):
@command_set("spindown", per_device=True)
def _set_spindown(self, value, device):
pass
tuned.utils.commands.execute(["hdparm", "-S", value, "/dev/" + device])
@command_get("spindown")
def _get_spindown(self, device):
# TODO: ticket #23, There's no way how to get current/old spindown value.
tuned.utils.commands.execute(["hdparm", "-S", value, "/dev/" + device])
pass
def _readahead_file(self, device):
return os.path.join("/sys/block/", device, "queue/read_ahead_kb")

View file

@ -28,6 +28,7 @@ def read_file(f):
def execute(args):
log.debug("Executing %s." % str(args))
out = ""
try:
proc = Popen(args, stdout=PIPE, stderr=PIPE)