• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

bootable/newinstaller


Commit MetaInfo

修订版9342b19ec4d7a996503a914049201926dcc0e3a6 (tree)
时间2016-08-11 20:31:14
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Add otion noatime to improve performance

This option avoids unnecessary writing on the file system.
It's suggested by Majian.

更改概述

差异

--- a/initrd/init
+++ b/initrd/init
@@ -65,7 +65,7 @@ try_mount()
6565 RW="nolock,$RW"
6666 fi
6767 # FIXME: any way to mount ntfs gracefully?
68- mount -o $RW $@ || mount.ntfs-3g -o rw,force $@
68+ mount -o $RW,noatime $@ || mount.ntfs-3g -o rw,force $@
6969 }
7070
7171 check_root()
@@ -89,11 +89,11 @@ check_root()
8989 fi
9090 zcat /mnt/$SRC/ramdisk.img | cpio -id > /dev/null
9191 if [ -e /mnt/$SRC/system.sfs ]; then
92- mount -o loop /mnt/$SRC/system.sfs /sfs
93- mount -o loop /sfs/system.img system
92+ mount -o loop,noatime /mnt/$SRC/system.sfs /sfs
93+ mount -o loop,noatime /sfs/system.img system
9494 elif [ -e /mnt/$SRC/system.img ]; then
9595 remount_rw
96- mount -o loop /mnt/$SRC/system.img system
96+ mount -o loop,noatime /mnt/$SRC/system.img system
9797 elif [ -d /mnt/$SRC/system ]; then
9898 remount_rw
9999 mount --bind /mnt/$SRC/system system
--- a/initrd/scripts/2-mount
+++ b/initrd/scripts/2-mount
@@ -13,13 +13,13 @@ mount_data()
1313 [ -n "$DATA" ] && blk=`basename $DATA` || blk=
1414 if [ -b "/dev/$blk" ]; then
1515 [ ! -e /dev/block/$blk ] && ln /dev/$blk /dev/block
16- mount /dev/block/$blk data
16+ mount -o noatime /dev/block/$blk data
1717 elif [ -d /mnt/$SRC/data ]; then
1818 remount_rw
1919 mount --bind /mnt/$SRC/data data
2020 elif [ -f /mnt/$SRC/data.img ]; then
2121 remount_rw
22- mount -o loop /mnt/$SRC/data.img data
22+ mount -o loop,noatime /mnt/$SRC/data.img data
2323 else
2424 device_mount_data || mount -t tmpfs tmpfs data
2525 fi