Skip to contentSkip to conversation

udev: don't mount with -o sync

PATCH Applied Jesse Zhang 3 participants 5 messages Jul 3, 2012 – Jul 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 udev: don't mount with -o sync

mount.sh mounts all partitions with -o sync, which is bad for system performance.

---
 meta/recipes-core/udev/udev/mount.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/udev/udev/mount.sh +1 -1
index 53fefa3..c13b8bb 100644
@@ -23,7 +23,7 @@ automount() {
 
 	! test -d "/media/$name" && mkdir -p "/media/$name"
 	
-	if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
+	if ! $MOUNT -t auto $DEVNAME "/media/$name"
 	then
 		#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
 		rm_dir "/media/$name"
Signature · 1 line
1.7.10.4
#1 lore raw

Op 3 jul. 2012, om 10:49 heeft Jesse Zhang het volgende geschreven:

Quoted 2 lines

mount.sh mounts all partitions with -o sync, which is bad for system performance.

But good for data integrity :)

Quoted 10 lines

---
meta/recipes-core/udev/udev/mount.sh | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/udev/udev/mount.sh +0 -0
index 53fefa3..c13b8bb 100644

meta/recipes-core/udev/udev/mount.sh automount() { · line 29

Quoted 8 lines
meta/recipes-core/udev/udev/mount.sh +1 -1
@@ -23,7 +23,7 @@ automount() {
 
 	! test -d "/media/$name" && mkdir -p "/media/$name"
 
-	if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
+	if ! $MOUNT -t auto $DEVNAME "/media/$name"
 	then
 		#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
 		rm_dir "/media/$name"

Missing PR bump

#2 lore raw
Quoted 7 lines · Koen Kooi

Op 3 jul. 2012, om 10:49 heeft Jesse Zhang het volgende geschreven:

Quoted 2 lines

mount.sh mounts all partitions with -o sync, which is bad for system performance.

But good for data integrity :)

Who cares about integrity as long as it's blazing fast :P

But I see the same was done for meta-openembedded.

commit 88295fc7dd7bf79b6eb2decfc64467defe829df8

Author: Koen Kooi <[email protected]>
Date:   Mon May 16 15:37:36 2011 +0200

udev: update to 168

- if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
+ if ! $MOUNT -t auto -o async,relatime $DEVNAME "/media/$name"

I omitted async,relatime since I think they are the default.

Quoted 13 lines
Quoted 13 lines

---
meta/recipes-core/udev/udev/mount.sh | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/udev/udev/mount.sh +0 -0
index 53fefa3..c13b8bb 100644
@@ -23,7 +23,7 @@ automount() {
 
 	! test -d "/media/$name" && mkdir -p "/media/$name"
 
Quoted 7 lines

meta/recipes-core/udev/udev/mount.sh automount() { · line 29

Quoted 5 lines
meta/recipes-core/udev/udev/mount.sh +1 -1
-	if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
+	if ! $MOUNT -t auto $DEVNAME "/media/$name"
 	then
 		#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
 		rm_dir "/media/$name"

Missing PR bump

Oh. Sorry I didn't realized about that.

jesse

#3 lore raw

PATCH v2 1/1 udev: don't mount with -o sync

In reply to Koen Kooi

mount.sh mounts all partitions with -o sync, which is bad for system performance.

---

Bump PR.

 meta/recipes-core/udev/udev/mount.sh |    2 +-
 meta/recipes-core/udev/udev_164.bb   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/udev/udev/mount.sh +1 -1
index 53fefa3..c13b8bb 100644
@@ -23,7 +23,7 @@ automount() {
 
 	! test -d "/media/$name" && mkdir -p "/media/$name"
 	
-	if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
+	if ! $MOUNT -t auto $DEVNAME "/media/$name"
 	then
 		#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
 		rm_dir "/media/$name"
meta/recipes-core/udev/udev_164.bb +1 -1
index c5813ec..0462ff2 100644
@@ -1,6 +1,6 @@
 include udev.inc
 
-PR = "r13"
+PR = "r14"
 
 SRC_URI += "file://udev-166-v4l1-1.patch"
 
Signature · 1 line
1.7.10.4
Applied
#4 lore raw
In reply to Jesse Zhang
Quoted 14 lines · Jesse Zhang

mount.sh mounts all partitions with -o sync, which is bad for system performance.

---
  meta/recipes-core/udev/udev/mount.sh |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/udev/udev/mount.sh +0 -0
index 53fefa3..c13b8bb 100644

meta/recipes-core/udev/udev/mount.sh automount() { · line 29

Quoted 8 lines
meta/recipes-core/udev/udev/mount.sh +1 -1
@@ -23,7 +23,7 @@ automount() {
 
  	! test -d "/media/$name" && mkdir -p "/media/$name"
 
-	if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
+	if ! $MOUNT -t auto $DEVNAME "/media/$name"
  	then
  		#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
  		rm_dir "/media/$name"

Merged into OE-Core

Thanks
Sau!