diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2010-06-09 05:23:57 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2010-06-09 05:38:24 -0500 |
commit | e2ea60907ca2b30e1ac5744d3e17dff16ed910ce (patch) | |
tree | 975016144dd301b2f5b7f524258b3c8e498fb49b | |
parent | 4eaf130c73b3234ed980866ce54a311407accf36 (diff) |
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.
-rw-r--r-- | pm/power.d/sata_alpm | 4 |
1 files changed, 4 insertions, 0 deletions
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" |