Description[Mac] Use raw disks (/dev/rdisk#) in image_writer_mac.
For some USB drives, writes on Mac are much slower than using the old image
creator. This is most likely because the implementation in Chrome uses
/dev/disk# whereas the old implementation used /dev/rdisk# whenever
possible.
The main requirement is that writes are in multiples of the block size, but
since ImageWriter::WriteChunk always writes in multiples of
kMemoryAlignment (4096), it should be fine to always use the raw disk.
My brief tests using a Lexar JumpDrive 16GB and a 1.6GB image:
before: ~6.5 minutes to write, same to verify
after: ~5 minutes to write, ~1.5 minutes to verify
BUG=415891
Committed: https://crrev.com/e06a8c6b35efd534d911d9d6382daf5e8986a1d1
Cr-Commit-Position: refs/heads/master@{#296875}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add a DCHECK in WriteChunk. #
Messages
Total messages: 12 (3 generated)
|