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

Unified Diff: delta_diff_generator.h

Issue 5548002: AU: When generating delta, use scratch off end of filesystem (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | delta_diff_generator.cc » ('j') | delta_diff_generator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_diff_generator.h
diff --git a/delta_diff_generator.h b/delta_diff_generator.h
index 53d3f87037468f1e23617a606b9a1a781727653d..853f2dd628eb1b01a04b3b3c55e73a3c09ad153a 100644
--- a/delta_diff_generator.h
+++ b/delta_diff_generator.h
@@ -79,12 +79,15 @@ class DeltaDiffGenerator {
// The final order of the nodes is given in |final_order|
// Some files may need to be reread from disk, thus |fd| and
// |data_file_size| are be passed.
+ // If |scratch_vertex| is not kInvalidIndex, removes it from
+ // |final_order| before returning.
// Returns true on success.
static bool ConvertGraphToDag(Graph* graph,
const std::string& new_root,
int fd,
off_t* data_file_size,
- std::vector<Vertex::Index>* final_order);
+ std::vector<Vertex::Index>* final_order,
+ Vertex::Index scratch_vertex);
// Reads old_filename (if it exists) and a new_filename and determines
// the smallest way to encode this file for the diff. It stores
@@ -100,6 +103,13 @@ class DeltaDiffGenerator {
DeltaArchiveManifest_InstallOperation* out_op,
bool gather_extents);
+ // Creates a dummy REPLACE_BZ node in the given vertex. This can be used
petkov 2010/12/02 05:04:06 I assume there's no difference if it's REPLACE_BZ
adlr 2010/12/02 19:21:41 Correct.
+ // to provide scratch space. The node should be marked invalid before
+ // writing all nodes to the output file.
+ static void CreateScratchNode(uint64_t start_block,
+ uint64_t num_blocks,
+ Vertex* vertex);
+
// Modifies blocks read by 'op' so that any blocks referred to by
// 'remove_extents' are replaced with blocks from 'replace_extents'.
// 'remove_extents' and 'replace_extents' must be the same number of blocks.
« no previous file with comments | « no previous file | delta_diff_generator.cc » ('j') | delta_diff_generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698