bootable/newinstaller
修订版 | 9342b19ec4d7a996503a914049201926dcc0e3a6 (tree) |
---|---|
时间 | 2016-08-11 20:31:14 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Add otion noatime to improve performance
This option avoids unnecessary writing on the file system.
It's suggested by Majian.
@@ -65,7 +65,7 @@ try_mount() | ||
65 | 65 | RW="nolock,$RW" |
66 | 66 | fi |
67 | 67 | # 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 $@ | |
69 | 69 | } |
70 | 70 | |
71 | 71 | check_root() |
@@ -89,11 +89,11 @@ check_root() | ||
89 | 89 | fi |
90 | 90 | zcat /mnt/$SRC/ramdisk.img | cpio -id > /dev/null |
91 | 91 | 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 | |
94 | 94 | elif [ -e /mnt/$SRC/system.img ]; then |
95 | 95 | remount_rw |
96 | - mount -o loop /mnt/$SRC/system.img system | |
96 | + mount -o loop,noatime /mnt/$SRC/system.img system | |
97 | 97 | elif [ -d /mnt/$SRC/system ]; then |
98 | 98 | remount_rw |
99 | 99 | mount --bind /mnt/$SRC/system system |
@@ -13,13 +13,13 @@ mount_data() | ||
13 | 13 | [ -n "$DATA" ] && blk=`basename $DATA` || blk= |
14 | 14 | if [ -b "/dev/$blk" ]; then |
15 | 15 | [ ! -e /dev/block/$blk ] && ln /dev/$blk /dev/block |
16 | - mount /dev/block/$blk data | |
16 | + mount -o noatime /dev/block/$blk data | |
17 | 17 | elif [ -d /mnt/$SRC/data ]; then |
18 | 18 | remount_rw |
19 | 19 | mount --bind /mnt/$SRC/data data |
20 | 20 | elif [ -f /mnt/$SRC/data.img ]; then |
21 | 21 | remount_rw |
22 | - mount -o loop /mnt/$SRC/data.img data | |
22 | + mount -o loop,noatime /mnt/$SRC/data.img data | |
23 | 23 | else |
24 | 24 | device_mount_data || mount -t tmpfs tmpfs data |
25 | 25 | fi |