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

Issue 650199: AU: Extent Mapper class (Closed)

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

Description

AU: Extent Mapper class Extent Mapper will use the FIBMAP (widely supported) ioctl to find out, for a given regular file, which extents it takes up on disk.

Patch Set 1 #

Total comments: 10

Patch Set 2 : fixes for review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -0 lines) Patch
M src/platform/update_engine/SConstruct View 2 chunks +2 lines, -0 lines 0 comments Download
A src/platform/update_engine/extent_mapper.h View 1 chunk +18 lines, -0 lines 0 comments Download
A src/platform/update_engine/extent_mapper.cc View 1 1 chunk +79 lines, -0 lines 0 comments Download
A src/platform/update_engine/extent_mapper_unittest.cc View 1 1 chunk +54 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
adlr
10 years, 10 months ago (2010-02-23 02:00:42 UTC) #1
Daniel Erat
http://codereview.chromium.org/650199/diff/1/3 File src/platform/update_engine/extent_mapper.cc (right): http://codereview.chromium.org/650199/diff/1/3#newcode9 src/platform/update_engine/extent_mapper.cc:9: #include <assert.h> alphabetize these? http://codereview.chromium.org/650199/diff/1/3#newcode23 src/platform/update_engine/extent_mapper.cc:23: const int kFieMapBufSize ...
10 years, 10 months ago (2010-02-23 20:08:51 UTC) #2
adlr
http://codereview.chromium.org/650199/diff/1/3 File src/platform/update_engine/extent_mapper.cc (right): http://codereview.chromium.org/650199/diff/1/3#newcode9 src/platform/update_engine/extent_mapper.cc:9: #include <assert.h> On 2010/02/23 20:08:51, Daniel Erat wrote: > ...
10 years, 10 months ago (2010-02-24 01:03:45 UTC) #3
Daniel Erat
10 years, 10 months ago (2010-02-24 01:37:44 UTC) #4
LGTM

http://codereview.chromium.org/650199/diff/1/3
File src/platform/update_engine/extent_mapper.cc (right):

http://codereview.chromium.org/650199/diff/1/3#newcode9
src/platform/update_engine/extent_mapper.cc:9: #include <assert.h>
On 2010/02/24 01:03:45, adlr wrote:
> On 2010/02/23 20:08:51, Daniel Erat wrote:
> > alphabetize these?
> 
> i think they are... at i thought the ordering was:
> 
> - corresponding .h file
> - sys standard include C files
> - non-sys standard include C files
> - libs
> - local .h files
> 
> what order do you suggest?

Ah, I didn't realize the sys vs. non-sys distinction; I think I mostly just do
corresponding .h, system C++ and C headers (i.e. STL and libc), angle-bracketed
headers, and then local ones.  Your order seems fine, but maybe add blank lines
between the groups to make the separation more distinct?

http://codereview.chromium.org/650199/diff/1/4
File src/platform/update_engine/extent_mapper.h (right):

http://codereview.chromium.org/650199/diff/1/4#newcode14
src/platform/update_engine/extent_mapper.h:14: bool ExtentsForFileFibmap(const
std::string& path, std::vector<Extent>* out);
On 2010/02/24 01:03:45, adlr wrote:
> On 2010/02/23 20:08:51, Daniel Erat wrote:
> > Are you planning to move this into an ExtentMapper class later?  Sticking a
> > single function in a file with a different name like this seems like it'll
> make
> > it difficult to find...
> 
> I wasn't planning to. Should I namespace it?

Your call, but I find that namespacing functions like this one or making them
static methods of a class makes it easier to infer where they're defined.

Powered by Google App Engine
This is Rietveld 408576698