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.


---

 25-akpm/Documentation/laptop-mode.txt |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff -puN Documentation/laptop-mode.txt~laptop-mode-mutt-noatime-doc-update Documentation/laptop-mode.txt
--- 25/Documentation/laptop-mode.txt~laptop-mode-mutt-noatime-doc-update	Mon May  3 14:50:31 2004
+++ 25-akpm/Documentation/laptop-mode.txt	Mon May  3 14:50:31 2004
@@ -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 ]; th
 	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

_