Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Issue 599853002: [Mac] Use raw disks (/dev/rdisk#) in image_writer_mac. (Closed)

Created:
6 years, 3 months ago by jackhou1
Modified:
6 years, 2 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M chrome/utility/image_writer/image_writer.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/utility/image_writer/image_writer_mac.cc View 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 12 (3 generated)
jackhou1
avi, I think you wrote the code in the old image creator, could you take ...
6 years, 3 months ago (2014-09-24 09:05:32 UTC) #2
Avi (use Gerrit)
lgtm
6 years, 3 months ago (2014-09-24 15:30:46 UTC) #3
Avi (use Gerrit)
https://codereview.chromium.org/599853002/diff/1/chrome/utility/image_writer/image_writer_mac.cc File chrome/utility/image_writer/image_writer_mac.cc (right): https://codereview.chromium.org/599853002/diff/1/chrome/utility/image_writer/image_writer_mac.cc#newcode104 chrome/utility/image_writer/image_writer_mac.cc:104: // multiples of kMemoryAlignment. I'm not familiar with WriteChunk. ...
6 years, 3 months ago (2014-09-24 15:31:36 UTC) #4
jackhou1
https://codereview.chromium.org/599853002/diff/1/chrome/utility/image_writer/image_writer_mac.cc File chrome/utility/image_writer/image_writer_mac.cc (right): https://codereview.chromium.org/599853002/diff/1/chrome/utility/image_writer/image_writer_mac.cc#newcode104 chrome/utility/image_writer/image_writer_mac.cc:104: // multiples of kMemoryAlignment. On 2014/09/24 15:31:36, Avi wrote: ...
6 years, 2 months ago (2014-09-24 23:58:43 UTC) #5
jackhou1
miket, could you review for OWNERS in chrome/utility/image_writer/
6 years, 2 months ago (2014-09-24 23:59:12 UTC) #7
miket_OOO
lgtm
6 years, 2 months ago (2014-09-26 02:19:59 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/599853002/20001
6 years, 2 months ago (2014-09-26 02:51:57 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 9874d6e8043a45762bade1e280dd62aecb4cc544
6 years, 2 months ago (2014-09-26 04:00:13 UTC) #11
commit-bot: I haz the power
6 years, 2 months ago (2014-09-26 04:00:48 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e06a8c6b35efd534d911d9d6382daf5e8986a1d1
Cr-Commit-Position: refs/heads/master@{#296875}

Powered by Google App Engine
This is Rietveld 408576698