summaryrefslogtreecommitdiff
path: root/scripts/update_device.py
diff options
context:
space:
mode:
authorAmin Hassani <ahassani@google.com>2017-06-23 12:42:00 -0700
committerTreehugger Robot <treehugger-gerrit@google.com>2017-07-26 20:50:28 +0000
commit4155520522b40a5e5f9b098eb903213d65d1cee6 (patch)
treed4afc9ac04a6521b547cc94ee2791f0ff258d08c /scripts/update_device.py
parentffb30ed63b5a186d4ed62c335d16b3b9467785ee (diff)
Fix the long time ioctl problem.
On some boards ioctl() takes a long time (several seconds) to perform discarding blocks for a few hundred MB (which might be expected). This causes the UE (which is single threaded) to block for ioctl for several seconds and prevents the message loop from responding to dbus requests. 'update_engine_client --status' relies on dbus signals to get the status of the update engine. This can cause 'cros flash' or provisionning of devices to fail due error returned from ssh invokation of update_engine_client. This CL fixes the issue by doing BLKDISCARD before BLKSECDISCARD. Discarding the end of partition were originally added for b/28744609. Also, BLKSECDISCARD never works on our android devices anyway; and it causes a selinux denial to sys_rawio. 670 W update_engine: [0708/111132:WARNING:delta_performer.cc(154)] Error discarding the last 152 KiB using ioctl(4733) 670 W update_engine: type=1400 audit(0.0:159): avc: denied { sys_rawio } for capability=17 scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0 tclass=capability permissive=0 BUG: 30035671 Test: unit tests pass (cherry picked from https://chromium-review.googlesource.com/547015) Change-Id: I91ea559910bfb39ddb3f824a5504983a8d553cc9
Diffstat (limited to 'scripts/update_device.py')
0 files changed, 0 insertions, 0 deletions