From e2ea60907ca2b30e1ac5744d3e17dff16ed910ce Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Wed, 9 Jun 2010 05:23:57 -0500 Subject: Refuse to change sata link pm states on kernels < 2.6.33 Kernels earlier then 2.6.33 have a bug that can cause filesystem corruption due to the upper layers aborting a transaction instead of retrying it if the sata link glitches out momentarily during a power state transition. --- pm/power.d/sata_alpm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pm/power.d/sata_alpm b/pm/power.d/sata_alpm index 82c8201..6391e09 100644 --- a/pm/power.d/sata_alpm +++ b/pm/power.d/sata_alpm @@ -22,6 +22,10 @@ EOF } set_sata_alpm() { + # see kernel commit 6013efd8860bf15c1f86f365332642cfe557152f + kv="$(uname -r)" + [ "$kv" ] || exit $NA #for paranoia's sake + [ "${kv%-*}" \< "2.6.33" ] && exit $NA # avoid fs corruption for f in /sys/class/scsi_host/host*/link_power_management_policy; do [ -w "$f" ] || continue echo "$1" > "$f" -- cgit v1.2.3