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

Issue 1819002: AU: delta compress the kernel partition (Closed)

Created:
10 years, 7 months ago by adlr
Modified:
9 years ago
Reviewers:
Daniel Erat
CC:
chromium-os-reviews_chromium.org, dneiss, adlr
Base URL:
ssh://git@chromiumos-git/chromeos
Visibility:
Public.

Description

AU: delta compress the kernel partition Add kernel partition to proto buf. Change delta generator to compress the kernel partition and the delta performer to perform operations to update the kernel partition. Update unittests to test it. Also, remove checksums from the protobuf while we're at it, since the partitions themselves will contains checksums. BUG=None TEST=Attached unittest

Patch Set 1 #

Total comments: 14

Patch Set 2 : fixes for review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -80 lines) Patch
M src/platform/update_engine/delta_diff_generator.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/platform/update_engine/delta_diff_generator.cc View 1 11 chunks +94 lines, -13 lines 0 comments Download
M src/platform/update_engine/delta_performer.h View 1 3 chunks +20 lines, -6 lines 0 comments Download
M src/platform/update_engine/delta_performer.cc View 1 12 chunks +93 lines, -37 lines 0 comments Download
M src/platform/update_engine/delta_performer_unittest.cc View 4 chunks +32 lines, -0 lines 0 comments Download
M src/platform/update_engine/download_action_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/extent_writer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/generate_delta_main.cc View 1 3 chunks +11 lines, -5 lines 0 comments Download
M src/platform/update_engine/test_utils.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/platform/update_engine/test_utils.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M src/platform/update_engine/update_metadata.proto View 1 chunk +2 lines, -4 lines 0 comments Download
M src/platform/update_engine/utils.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/platform/update_engine/utils.cc View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
adlr
10 years, 7 months ago (2010-04-30 00:44:04 UTC) #1
Daniel Erat
LGTM with some comments http://codereview.chromium.org/1819002/diff/1/2 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/1819002/diff/1/2#newcode442 src/platform/update_engine/delta_diff_generator.cc:442: TEST_AND_RETURN_FALSE(old_part_size >= 0); does it ...
10 years, 7 months ago (2010-04-30 01:04:39 UTC) #2
Daniel Erat
LGTM with some comments
10 years, 7 months ago (2010-04-30 01:04:42 UTC) #3
adlr
I've made the changes, and if I don't hear anything I'll submit in the morning. ...
10 years, 7 months ago (2010-04-30 04:27:11 UTC) #4
Daniel Erat
10 years, 7 months ago (2010-04-30 05:29:14 UTC) #5
Thanks, sounds good.

On Thu, Apr 29, 2010 at 9:27 PM,  <adlr@chromium.org> wrote:
> I've made the changes, and if I don't hear anything I'll submit in the
> morning.
> I'd submit now, given your LGTM, but I'm about to head out and don't want to
> break the build.
>
>
> http://codereview.chromium.org/1819002/diff/1/2
> File src/platform/update_engine/delta_diff_generator.cc (right):
>
> http://codereview.chromium.org/1819002/diff/1/2#newcode442
> src/platform/update_engine/delta_diff_generator.cc:442:
> TEST_AND_RETURN_FALSE(old_part_size >= 0);
> On 2010/04/30 01:04:40, Daniel Erat wrote:
>>
>> does it make sense to test this before generating the diff?
>
> Yeah, I'd like to keep these here b/c it's right near where it's used,
> but i added a similar check that occurs earlier so that it can fail
> faster.
>
> http://codereview.chromium.org/1819002/diff/1/2#newcode797
> src/platform/update_engine/delta_diff_generator.cc:797: LOG(INFO) <<
> "here";
> On 2010/04/30 01:04:40, Daniel Erat wrote:
>>
>> delete this
>
> Done.
>
> http://codereview.chromium.org/1819002/diff/1/4
> File src/platform/update_engine/delta_performer.cc (right):
>
> http://codereview.chromium.org/1819002/diff/1/4#newcode118
> src/platform/update_engine/delta_performer.cc:118: bool success =
> OpenFile(kernel_path, &kernel_fd_, &err);
> On 2010/04/30 01:04:40, Daniel Erat wrote:
>>
>> log errno on failure?
>
> Done. (within OpenFile())
>
> http://codereview.chromium.org/1819002/diff/1/4#newcode140
> src/platform/update_engine/delta_performer.cc:140: return -err;
> On 2010/04/30 01:04:40, Daniel Erat wrote:
>>
>> what's the reason to return errno from OpenKernel() and Close()
>
> instead of just
>>
>> including it in the error message on failure and returning true/false?
>
> It's part of the FileWriter API. I'll log the specific error here, it's
> another question if we should change the API to return a bool for
> Close().
>
> http://codereview.chromium.org/1819002/diff/1/4#newcode187
> src/platform/update_engine/delta_performer.cc:187: while
> (next_operation_ < total_operations) {
> On 2010/04/30 01:04:40, Daniel Erat wrote:
>>
>> next_operation_num_ would be a better name
>
> Done.
>
> http://codereview.chromium.org/1819002/diff/1/5
> File src/platform/update_engine/delta_performer.h (right):
>
> http://codereview.chromium.org/1819002/diff/1/5#newcode29
> src/platform/update_engine/delta_performer.h:29: // Opens the Kernel.
> Should be called before or after Open(), but before
> On 2010/04/30 01:04:40, Daniel Erat wrote:
>>
>> s/Kernel/kernel/
>
> Done.
>
> http://codereview.chromium.org/1819002/diff/1/9
> File src/platform/update_engine/generate_delta_main.cc (right):
>
> http://codereview.chromium.org/1819002/diff/1/9#newcode87
> src/platform/update_engine/generate_delta_main.cc:87: LOG(FATAL) <<
> "Missing required argument(s)";
> On 2010/04/30 01:04:40, Daniel Erat wrote:
>>
>> something like this would probably be more helpful:
>
>> CHECK(!FLAGS_old_dir.empty());
>> CHECK(!FLAGS_new_dir.empty());
>> etc.
>
> Done.
>
> http://codereview.chromium.org/1819002/show
>

Powered by Google App Engine
This is Rietveld 408576698