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

Unified Diff: src/platform/update_engine/extent_mapper.h

Issue 891002: AU: Delta Diff Generator (Closed)
Patch Set: fixes for review Created 10 years, 9 months 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
Index: src/platform/update_engine/extent_mapper.h
diff --git a/src/platform/update_engine/extent_mapper.h b/src/platform/update_engine/extent_mapper.h
index acdd4182aceed7588c8f5a6d2ac516c9dc4cc05b..b15cf4aef5894841a3d16e3a1384bf85cc7d359a 100755
--- a/src/platform/update_engine/extent_mapper.h
+++ b/src/platform/update_engine/extent_mapper.h
@@ -7,14 +7,27 @@
#include <string>
#include <vector>
+#include "base/basictypes.h"
#include "update_engine/update_metadata.pb.h"
namespace chromeos_update_engine {
namespace extent_mapper {
+// Uses the FIBMAP ioctl to get all blocks used by a file and return them
+// as extents. Blocks are relative to the start of the filesystem. If
+// there is a sparse "hole" in the file, the blocks for that will be
+// represented by an extent whose start block is kSpareseHole.
+// The resulting extents are stored in 'out'. Keep in mind that while
+// the blocksize of a filesystem is often 4096 bytes, that is not always
+// the case, so one should consult GetFilesystemBlockSize(), too.
+// Returns true on success.
bool ExtentsForFileFibmap(const std::string& path, std::vector<Extent>* out);
+// Puts the blocksize of the filesystem, as used by the FIBMAP ioctl, into
+// out_blocksize by using the FIGETBSZ ioctl. Returns true on success.
+bool GetFilesystemBlockSize(const std::string& path, uint32* out_blocksize);
+
} // namespace extent_mapper
} // namespace chromeos_update_engine
« no previous file with comments | « src/platform/update_engine/delta_diff_generator_unittest.cc ('k') | src/platform/update_engine/extent_mapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698