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

Issue 891002: AU: Delta Diff Generator (Closed)

Created:
10 years, 9 months ago by adlr
Modified:
9 years ago
Reviewers:
Daniel Erat
CC:
chromium-os-reviews_googlegroups.com
Visibility:
Public.

Description

AU: Delta Diff Generator Adds a class that can take two root filesystem image and generate a delta between them. Currently it's not very well tested, but this will improve once the diff applicator is written. Also, an executable to run the generator. Other changes: - Stop leaking loop devices in unittests - extent mapper: support sparse files, ability to get FS block size - AppendBlockToExtents support sparse files - subprocess more verbose on errors - add WriteAll to utils (WriteAll avoids short-write() returns) - mkstemp wrapper for ease of use - VectorIndexOf, finds index of an element in a vector

Patch Set 1 #

Patch Set 2 : put obsolete_logging header back #

Total comments: 24

Patch Set 3 : fixes for review #

Total comments: 28

Patch Set 4 : fixes for review #

Total comments: 58

Patch Set 5 : fixes for review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1471 lines, -76 lines) Patch
M src/platform/update_engine/bzip.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/delta_diff_generator.h View 1 2 3 4 1 chunk +97 lines, -1 line 0 comments Download
M src/platform/update_engine/delta_diff_generator.cc View 1 2 3 4 1 chunk +860 lines, -0 lines 0 comments Download
M src/platform/update_engine/delta_diff_generator_unittest.cc View 1 2 3 4 1 chunk +326 lines, -6 lines 0 comments Download
M src/platform/update_engine/extent_mapper.h View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M src/platform/update_engine/extent_mapper.cc View 1 2 3 4 3 chunks +15 lines, -23 lines 0 comments Download
M src/platform/update_engine/extent_mapper_unittest.cc View 3 chunks +40 lines, -2 lines 0 comments Download
M src/platform/update_engine/extent_writer.cc View 1 2 3 4 2 chunks +2 lines, -15 lines 0 comments Download
M src/platform/update_engine/filesystem_copier_action_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/platform/update_engine/filesystem_iterator_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/platform/update_engine/generate_delta_main.cc View 1 2 3 4 3 chunks +25 lines, -14 lines 0 comments Download
M src/platform/update_engine/graph_types.h View 4 chunks +6 lines, -2 lines 0 comments Download
M src/platform/update_engine/graph_utils.cc View 1 2 3 4 2 chunks +11 lines, -2 lines 0 comments Download
M src/platform/update_engine/postinstall_runner_action_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/subprocess.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/platform/update_engine/test_utils.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/topological_sort.cc View 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M src/platform/update_engine/utils.h View 1 2 3 4 3 chunks +28 lines, -0 lines 0 comments Download
M src/platform/update_engine/utils.cc View 1 2 3 4 4 chunks +34 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
adlr
It's not as bad as it looks. delta_diff_generator* is the meat of it, the other ...
10 years, 9 months ago (2010-03-12 01:42:37 UTC) #1
Daniel Erat
just giving you a few early comments so i can slack off a bit more ...
10 years, 9 months ago (2010-03-16 21:55:30 UTC) #2
adlr
ready for another look. thanks! http://codereview.chromium.org/891002/diff/3001/4002 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/891002/diff/3001/4002#newcode73 src/platform/update_engine/delta_diff_generator.cc:73: LOG(INFO) << "here"; On ...
10 years, 9 months ago (2010-03-17 20:47:41 UTC) #3
Daniel Erat
http://codereview.chromium.org/891002/diff/6002/9002 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/891002/diff/6002/9002#newcode90 src/platform/update_engine/delta_diff_generator.cc:90: bool AddExtentsToBlocks(const DeltaArchiveManifest_InstallOperation& operation, this name seems a bit ...
10 years, 9 months ago (2010-03-18 01:00:27 UTC) #4
adlr
thanks for reviewing; i've made the changes. have another look http://codereview.chromium.org/891002/diff/6002/9002 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/891002/diff/6002/9002#newcode90 ...
10 years, 9 months ago (2010-03-19 01:13:43 UTC) #5
Daniel Erat
Sorry for taking so long on this. LGTM after these (mostly stylistic) comments are addressed. ...
10 years, 9 months ago (2010-03-28 16:19:41 UTC) #6
adlr
Not submitting b/c I have a couple questions for you to answer. Thanks, http://codereview.chromium.org/891002/diff/13001/14002 File ...
10 years, 8 months ago (2010-03-30 03:32:07 UTC) #7
Daniel Erat
10 years, 8 months ago (2010-03-30 03:48:52 UTC) #8
http://codereview.chromium.org/891002/diff/13001/14018
File src/platform/update_engine/utils.cc (right):

http://codereview.chromium.org/891002/diff/13001/14018#newcode42
src/platform/update_engine/utils.cc:42: ssize_t rc = write(fd, c_buf +
bytes_written, count - bytes_written);
On 2010/03/30 03:32:07, adlr wrote:
> On 2010/03/28 16:19:41, Daniel Erat wrote:
> > i didn't know about this until recently, but chrome defines a HANDLE_EINTR()
> > wrapper macro in base/eintr_wrapper.h that you should technically be putting
> > around many of these syscalls
> 
> How about I put this in a future CL? It's on the list...

Sure, sounds good.

http://codereview.chromium.org/891002/diff/13001/14018#newcode218
src/platform/update_engine/utils.cc:218: vector<char>
buf(filename_template.size() + 1);
On 2010/03/30 03:32:07, adlr wrote:
> On 2010/03/28 16:19:41, Daniel Erat wrote:
> > you do this in other places too, right?  worth writing a utility function
for
> > it?
> 
> what are you referring to? if you mean calling mkstemp, this is the utility
> function

Sorry for not being more specific: copying std::string into std::vector<char>
and null-terminating it.

Powered by Google App Engine
This is Rietveld 408576698