aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools/media_create
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2014-08-03 13:15:09 +0100
committerNeil Williams <neil.williams@linaro.org>2014-08-03 13:18:18 +0100
commitc4ccbb650e1921ceea71b47378f083769ea9df91 (patch)
treeee3e6afa90ececdb829a22b8d2a89b4426b9605b /linaro_image_tools/media_create
parent6149c49665f3e6727d5739326d48eabd9f3a036c (diff)
downloadlinaro-image-tools-c4ccbb650e1921ceea71b47378f083769ea9df91.tar.gz
Drop all calls to sync
Remove calls to sync as umount correctly flushes the buffers for the filesystem to umount whereas sync forces flushing of all kernel buffers, local and remote, which causes l-m-c tasks to stall when multiple jobs run l-m-c simultaneously on a single machine. Change-Id: I87acbb4fed4717a9d5fdeaf21156562cc8d9c201
Diffstat (limited to 'linaro_image_tools/media_create')
-rw-r--r--linaro_image_tools/media_create/android_boards.py1
-rw-r--r--linaro_image_tools/media_create/boards.py8
-rw-r--r--linaro_image_tools/media_create/partitions.py7
3 files changed, 2 insertions, 14 deletions
diff --git a/linaro_image_tools/media_create/android_boards.py b/linaro_image_tools/media_create/android_boards.py
index 85a2197..4f081fa 100644
--- a/linaro_image_tools/media_create/android_boards.py
+++ b/linaro_image_tools/media_create/android_boards.py
@@ -224,7 +224,6 @@ class AndroidBoardConfig(BoardConfig):
boot_script_path = os.path.join(boot_dir, self.boot_script)
make_boot_script(boot_env, boot_script_path)
- cmd_runner.run(['sync']).wait()
try:
cmd_runner.run(['umount', boot_disk], as_root=True).wait()
except cmd_runner.SubcommandNonZeroReturnValue:
diff --git a/linaro_image_tools/media_create/boards.py b/linaro_image_tools/media_create/boards.py
index 03294f4..3b3c87d 100644
--- a/linaro_image_tools/media_create/boards.py
+++ b/linaro_image_tools/media_create/boards.py
@@ -758,8 +758,6 @@ class BoardConfig(object):
"Copying spl '%s' to boot partition." % spl_file)
cmd_runner.run(["cp", "-v", spl_file, boot_dir],
as_root=True).wait()
- # XXX: Is this really needed?
- cmd_runner.run(["sync"]).wait()
if self.spl_dd:
self._dd_file(spl_file, boot_device_or_file, self.spl_dd)
@@ -1782,8 +1780,6 @@ class ArndaleConfig(SamsungConfig):
"Copying spl '%s' to boot partition." % spl_file)
cmd_runner.run(["cp", "-v", spl_file, boot_dir],
as_root=True).wait()
- # XXX: Is this really needed?
- cmd_runner.run(["sync"]).wait()
if self.spl_dd:
self._dd_file(spl_file, boot_device_or_file, self.spl_dd)
@@ -1866,8 +1862,6 @@ class ArndaleOctaConfig(ArndaleConfig):
"Copying spl '%s' to boot partition." % spl_file)
cmd_runner.run(["cp", "-v", spl_file, boot_dir],
as_root=True).wait()
- # XXX: Is this really needed?
- cmd_runner.run(["sync"]).wait()
if self.spl_dd:
self._dd_file(spl_file, boot_device_or_file, self.spl_dd)
@@ -2214,8 +2208,6 @@ def install_omap_boot_loader(chroot_dir, boot_disk, cls):
default = None
mlo_file = cls.get_file('spl_file', default=default)
cmd_runner.run(["cp", "-v", mlo_file, boot_disk], as_root=True).wait()
- # XXX: Is this really needed?
- cmd_runner.run(["sync"]).wait()
def make_boot_ini(boot_script_path, boot_disk):
diff --git a/linaro_image_tools/media_create/partitions.py b/linaro_image_tools/media_create/partitions.py
index 0ee3a77..caa44a6 100644
--- a/linaro_image_tools/media_create/partitions.py
+++ b/linaro_image_tools/media_create/partitions.py
@@ -200,8 +200,7 @@ def partition_mounted(device, path, *args):
"""A context manager that mounts the given device and umounts when done.
We use a try/finally to make sure the device is umounted even if there's
- an uncaught exception in the with block. Also, before umounting we call
- 'sync'.
+ an uncaught exception in the with block.
:param *args: Extra arguments to the mount command.
"""
@@ -211,7 +210,6 @@ def partition_mounted(device, path, *args):
try:
yield
finally:
- cmd_runner.run(['sync']).wait()
try:
umount(path)
except cmd_runner.SubcommandNonZeroReturnValue, e:
@@ -603,8 +601,7 @@ def create_partitions(board_config, media, heads, sectors, cylinders=None,
run_sfdisk_commands(sfdisk_cmd, heads, sectors, cylinders, media.path)
- # Sync and sleep to wait for the partition to settle.
- cmd_runner.run(['sync']).wait()
+ # sleep to wait for the partition to settle.
wait_partition_to_settle(media, part_table)