Commit e33daf9d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Laptop Mode doc update

From: <bart@samwel.tk>

Richard Atterer reported that mutt does not play well with noatime (it uses
access times to check whether new mail has arrived in a folder).  This patch
warns about this in the doc, and adds a setting to the control script to
disable the noatime remount.
parent c489e9e6
......@@ -76,6 +76,11 @@ Caveats
variables in centisecs (like most other subsystems do) but in "jiffies",
which is an internal kernel measure. Once this is fixed things will get better.
* It has been reported that some versions of the mutt mail client use file access
times to determine whether a folder contains new mail. If you use mutt and
experience this, you must disable the noatime remounting in the control script
by setting DO_REMOUNT_NOATIME=0.
The details
-----------
......@@ -295,6 +300,9 @@ esac
# Shall we remount journaled fs. with appropiate commit interval? (1=yes)
DO_REMOUNTS=1
# And shall we add the "noatime" option to that as well? (1=yes)
DO_REMOUNT_NOATIME=1
# age time, in seconds. should be put into a sysconfig file
MAX_AGE=600
......@@ -335,6 +343,10 @@ if [ ! -w /proc/sys/vm/laptop_mode ]; then
exit 1
fi
if [ $DO_REMOUNT_NOATIME -eq 1 ]; then
NOATIME_OPT=",noatime"
fi
case "$1" in
start)
AGE=$((100*$MAX_AGE))
......@@ -376,10 +388,10 @@ case "$1" in
case "$FST" in
"ext3"|"reiserfs")
PARSEDOPTS="$(parse_mount_opts commit "$OPTS")"
mount $DEV -t $FST $MP -o remount,$PARSEDOPTS,commit=$MAX_AGE,noatime
mount $DEV -t $FST $MP -o remount,$PARSEDOPTS,commit=$MAX_AGE$NOATIME_OPT
;;
"xfs")
mount $DEV -t $FST $MP -o remount,$OPTS,noatime
mount $DEV -t $FST $MP -o remount,$OPTS$NOATIME_OPT
;;
esac
if [ -b $DEV ] ; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment