update_engine: Replace vector<Extent> with RepeatedPtrField<Extent>
This patch removes references to vector<Extent> and replaces them with
RepeatedPtrField in payload_consumer. Extent itself is a protobuf item
and it makes sense to use google::protobuf::RepeatedPtrField instead of
vector because then we won't have any extra copy to vector. We can
directly use the list of extents given in the payload protobuf.
Also removed references to vector in files which did not use vector.
BUG=chromium:766397
TEST=FEATURES="test" emerge-amd64-generic update_engine
Change-Id: I1f12332ff4d6303c1e4b7470bb87bf934acdf81a
Reviewed-on: https://chromium-review.googlesource.com/672006
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
diff --git a/payload_consumer/bzip_extent_writer.cc b/payload_consumer/bzip_extent_writer.cc
index 0fcc8ba..39d9d67 100644
--- a/payload_consumer/bzip_extent_writer.cc
+++ b/payload_consumer/bzip_extent_writer.cc
@@ -16,7 +16,7 @@
#include "update_engine/payload_consumer/bzip_extent_writer.h"
-using std::vector;
+using google::protobuf::RepeatedPtrField;
namespace chromeos_update_engine {
@@ -25,7 +25,7 @@
}
bool BzipExtentWriter::Init(FileDescriptorPtr fd,
- const vector<Extent>& extents,
+ const RepeatedPtrField<Extent>& extents,
uint32_t block_size) {
// Init bzip2 stream
int rc = BZ2_bzDecompressInit(&stream_,
diff --git a/payload_consumer/bzip_extent_writer.h b/payload_consumer/bzip_extent_writer.h
index 0ad542e..86b346a 100644
--- a/payload_consumer/bzip_extent_writer.h
+++ b/payload_consumer/bzip_extent_writer.h
@@ -19,7 +19,7 @@
#include <bzlib.h>
#include <memory>
-#include <vector>
+#include <utility>
#include <brillo/secure_blob.h>
@@ -41,7 +41,7 @@
~BzipExtentWriter() override = default;
bool Init(FileDescriptorPtr fd,
- const std::vector<Extent>& extents,
+ const google::protobuf::RepeatedPtrField<Extent>& extents,
uint32_t block_size) override;
bool Write(const void* bytes, size_t count) override;
bool EndImpl() override;
diff --git a/payload_consumer/bzip_extent_writer_unittest.cc b/payload_consumer/bzip_extent_writer_unittest.cc
index 6b5e1c0..c0efd63 100644
--- a/payload_consumer/bzip_extent_writer_unittest.cc
+++ b/payload_consumer/bzip_extent_writer_unittest.cc
@@ -27,7 +27,9 @@
#include "update_engine/common/test_utils.h"
#include "update_engine/common/utils.h"
+#include "update_engine/payload_generator/extent_ranges.h"
+using google::protobuf::RepeatedPtrField;
using std::min;
using std::string;
using std::vector;
@@ -55,11 +57,7 @@
};
TEST_F(BzipExtentWriterTest, SimpleTest) {
- vector<Extent> extents;
- Extent extent;
- extent.set_start_block(0);
- extent.set_num_blocks(1);
- extents.push_back(extent);
+ vector<Extent> extents = {ExtentForRange(0, 1)};
// 'echo test | bzip2 | hexdump' yields:
static const char test_uncompressed[] = "test\n";
@@ -71,7 +69,8 @@
};
BzipExtentWriter bzip_writer(base::MakeUnique<DirectExtentWriter>());
- EXPECT_TRUE(bzip_writer.Init(fd_, extents, kBlockSize));
+ EXPECT_TRUE(
+ bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize));
EXPECT_TRUE(bzip_writer.Write(test, sizeof(test)));
EXPECT_TRUE(bzip_writer.End());
@@ -101,14 +100,12 @@
for (size_t i = 0; i < decompressed_data.size(); ++i)
decompressed_data[i] = static_cast<uint8_t>("ABC\n"[i % 4]);
- vector<Extent> extents;
- Extent extent;
- extent.set_start_block(0);
- extent.set_num_blocks((kDecompressedLength + kBlockSize - 1) / kBlockSize);
- extents.push_back(extent);
+ vector<Extent> extents = {
+ ExtentForRange(0, (kDecompressedLength + kBlockSize - 1) / kBlockSize)};
BzipExtentWriter bzip_writer(base::MakeUnique<DirectExtentWriter>());
- EXPECT_TRUE(bzip_writer.Init(fd_, extents, kBlockSize));
+ EXPECT_TRUE(
+ bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize));
brillo::Blob original_compressed_data = compressed_data;
for (brillo::Blob::size_type i = 0; i < compressed_data.size();
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index 9643df3..9299dcd 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -946,13 +946,8 @@
writer.reset(new XzExtentWriter(std::move(writer)));
}
- // Create a vector of extents to pass to the ExtentWriter.
- vector<Extent> extents;
- for (int i = 0; i < operation.dst_extents_size(); i++) {
- extents.push_back(operation.dst_extents(i));
- }
-
- TEST_AND_RETURN_FALSE(writer->Init(target_fd_, extents, block_size_));
+ TEST_AND_RETURN_FALSE(
+ writer->Init(target_fd_, operation.dst_extents(), block_size_));
TEST_AND_RETURN_FALSE(writer->Write(buffer_.data(), operation.data_length()));
TEST_AND_RETURN_FALSE(writer->End());
diff --git a/payload_consumer/download_action.cc b/payload_consumer/download_action.cc
index 43812d7..cf550f5 100644
--- a/payload_consumer/download_action.cc
+++ b/payload_consumer/download_action.cc
@@ -20,7 +20,6 @@
#include <algorithm>
#include <string>
-#include <vector>
#include <base/files/file_path.h>
#include <base/metrics/statistics_recorder.h>
@@ -36,7 +35,6 @@
using base::FilePath;
using std::string;
-using std::vector;
namespace chromeos_update_engine {
diff --git a/payload_consumer/download_action_unittest.cc b/payload_consumer/download_action_unittest.cc
index ae85cb5..9d74116 100644
--- a/payload_consumer/download_action_unittest.cc
+++ b/payload_consumer/download_action_unittest.cc
@@ -22,7 +22,6 @@
#include <memory>
#include <string>
#include <utility>
-#include <vector>
#include <base/bind.h>
#include <base/files/file_path.h>
@@ -51,7 +50,6 @@
using base::WriteFile;
using std::string;
using std::unique_ptr;
-using std::vector;
using test_utils::ScopedTempFile;
using testing::AtLeast;
using testing::InSequence;
diff --git a/payload_consumer/extent_writer.cc b/payload_consumer/extent_writer.cc
index 5501e22..c5776ec 100644
--- a/payload_consumer/extent_writer.cc
+++ b/payload_consumer/extent_writer.cc
@@ -34,21 +34,19 @@
return true;
const char* c_bytes = reinterpret_cast<const char*>(bytes);
size_t bytes_written = 0;
- while (count - bytes_written > 0) {
- TEST_AND_RETURN_FALSE(next_extent_index_ < extents_.size());
- uint64_t bytes_remaining_next_extent =
- extents_[next_extent_index_].num_blocks() * block_size_ -
- extent_bytes_written_;
- CHECK_NE(bytes_remaining_next_extent, static_cast<uint64_t>(0));
+ while (bytes_written < count) {
+ TEST_AND_RETURN_FALSE(cur_extent_ != extents_.end());
+ uint64_t bytes_remaining_cur_extent =
+ cur_extent_->num_blocks() * block_size_ - extent_bytes_written_;
+ CHECK_NE(bytes_remaining_cur_extent, static_cast<uint64_t>(0));
size_t bytes_to_write =
static_cast<size_t>(min(static_cast<uint64_t>(count - bytes_written),
- bytes_remaining_next_extent));
+ bytes_remaining_cur_extent));
TEST_AND_RETURN_FALSE(bytes_to_write > 0);
- if (extents_[next_extent_index_].start_block() != kSparseHole) {
+ if (cur_extent_->start_block() != kSparseHole) {
const off64_t offset =
- extents_[next_extent_index_].start_block() * block_size_ +
- extent_bytes_written_;
+ cur_extent_->start_block() * block_size_ + extent_bytes_written_;
TEST_AND_RETURN_FALSE_ERRNO(fd_->Seek(offset, SEEK_SET) !=
static_cast<off64_t>(-1));
TEST_AND_RETURN_FALSE(
@@ -56,13 +54,12 @@
}
bytes_written += bytes_to_write;
extent_bytes_written_ += bytes_to_write;
- if (bytes_remaining_next_extent == bytes_to_write) {
+ if (bytes_remaining_cur_extent == bytes_to_write) {
// We filled this extent
- CHECK_EQ(extent_bytes_written_,
- extents_[next_extent_index_].num_blocks() * block_size_);
+ CHECK_EQ(extent_bytes_written_, cur_extent_->num_blocks() * block_size_);
// move to next extent
extent_bytes_written_ = 0;
- next_extent_index_++;
+ cur_extent_++;
}
}
return true;
diff --git a/payload_consumer/extent_writer.h b/payload_consumer/extent_writer.h
index 6484ebf..2c15861 100644
--- a/payload_consumer/extent_writer.h
+++ b/payload_consumer/extent_writer.h
@@ -17,7 +17,8 @@
#ifndef UPDATE_ENGINE_PAYLOAD_CONSUMER_EXTENT_WRITER_H_
#define UPDATE_ENGINE_PAYLOAD_CONSUMER_EXTENT_WRITER_H_
-#include <vector>
+#include <memory>
+#include <utility>
#include <base/logging.h>
#include <brillo/secure_blob.h>
@@ -40,7 +41,7 @@
// Returns true on success.
virtual bool Init(FileDescriptorPtr fd,
- const std::vector<Extent>& extents,
+ const google::protobuf::RepeatedPtrField<Extent>& extents,
uint32_t block_size) = 0;
// Returns true on success.
@@ -66,11 +67,12 @@
~DirectExtentWriter() override = default;
bool Init(FileDescriptorPtr fd,
- const std::vector<Extent>& extents,
+ const google::protobuf::RepeatedPtrField<Extent>& extents,
uint32_t block_size) override {
fd_ = fd;
block_size_ = block_size;
extents_ = extents;
+ cur_extent_ = extents_.begin();
return true;
}
bool Write(const void* bytes, size_t count) override;
@@ -80,11 +82,11 @@
FileDescriptorPtr fd_{nullptr};
size_t block_size_{0};
- // Bytes written into next_extent_index_ thus far
+ // Bytes written into |cur_extent_| thus far.
uint64_t extent_bytes_written_{0};
- std::vector<Extent> extents_;
- // The next call to write should correspond to extents_[next_extent_index_]
- std::vector<Extent>::size_type next_extent_index_{0};
+ google::protobuf::RepeatedPtrField<Extent> extents_;
+ // The next call to write should correspond to |cur_extents_|.
+ google::protobuf::RepeatedPtrField<Extent>::iterator cur_extent_;
};
// Takes an underlying ExtentWriter to which all operations are delegated.
@@ -100,7 +102,7 @@
~ZeroPadExtentWriter() override = default;
bool Init(FileDescriptorPtr fd,
- const std::vector<Extent>& extents,
+ const google::protobuf::RepeatedPtrField<Extent>& extents,
uint32_t block_size) override {
block_size_ = block_size;
return underlying_extent_writer_->Init(fd, extents, block_size);
diff --git a/payload_consumer/extent_writer_unittest.cc b/payload_consumer/extent_writer_unittest.cc
index f9304a3..1f5fbaa 100644
--- a/payload_consumer/extent_writer_unittest.cc
+++ b/payload_consumer/extent_writer_unittest.cc
@@ -29,6 +29,7 @@
#include "update_engine/common/test_utils.h"
#include "update_engine/common/utils.h"
#include "update_engine/payload_consumer/payload_constants.h"
+#include "update_engine/payload_generator/extent_ranges.h"
using chromeos_update_engine::test_utils::ExpectVectorsEq;
using std::min;
@@ -65,16 +66,11 @@
};
TEST_F(ExtentWriterTest, SimpleTest) {
- vector<Extent> extents;
- Extent extent;
- extent.set_start_block(1);
- extent.set_num_blocks(1);
- extents.push_back(extent);
-
+ vector<Extent> extents = {ExtentForRange(1, 1)};
const string bytes = "1234";
-
DirectExtentWriter direct_writer;
- EXPECT_TRUE(direct_writer.Init(fd_, extents, kBlockSize));
+ EXPECT_TRUE(
+ direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize));
EXPECT_TRUE(direct_writer.Write(bytes.data(), bytes.size()));
EXPECT_TRUE(direct_writer.End());
@@ -91,14 +87,10 @@
}
TEST_F(ExtentWriterTest, ZeroLengthTest) {
- vector<Extent> extents;
- Extent extent;
- extent.set_start_block(1);
- extent.set_num_blocks(1);
- extents.push_back(extent);
-
+ vector<Extent> extents = {ExtentForRange(1, 1)};
DirectExtentWriter direct_writer;
- EXPECT_TRUE(direct_writer.Init(fd_, extents, kBlockSize));
+ EXPECT_TRUE(
+ direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize));
EXPECT_TRUE(direct_writer.Write(nullptr, 0));
EXPECT_TRUE(direct_writer.End());
}
@@ -117,23 +109,14 @@
void ExtentWriterTest::WriteAlignedExtents(size_t chunk_size,
size_t first_chunk_size) {
- vector<Extent> extents;
- Extent extent;
- extent.set_start_block(1);
- extent.set_num_blocks(1);
- extents.push_back(extent);
- extent.set_start_block(0);
- extent.set_num_blocks(1);
- extents.push_back(extent);
- extent.set_start_block(2);
- extent.set_num_blocks(1);
- extents.push_back(extent);
-
+ vector<Extent> extents = {
+ ExtentForRange(1, 1), ExtentForRange(0, 1), ExtentForRange(2, 1)};
brillo::Blob data(kBlockSize * 3);
test_utils::FillWithData(&data);
DirectExtentWriter direct_writer;
- EXPECT_TRUE(direct_writer.Init(fd_, extents, kBlockSize));
+ EXPECT_TRUE(
+ direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize));
size_t bytes_written = 0;
while (bytes_written < data.size()) {
@@ -172,21 +155,14 @@
}
void ExtentWriterTest::TestZeroPad(bool aligned_size) {
- vector<Extent> extents;
- Extent extent;
- extent.set_start_block(1);
- extent.set_num_blocks(1);
- extents.push_back(extent);
- extent.set_start_block(0);
- extent.set_num_blocks(1);
- extents.push_back(extent);
-
+ vector<Extent> extents = {ExtentForRange(1, 1), ExtentForRange(0, 1)};
brillo::Blob data(kBlockSize * 2);
test_utils::FillWithData(&data);
ZeroPadExtentWriter zero_pad_writer(base::MakeUnique<DirectExtentWriter>());
- EXPECT_TRUE(zero_pad_writer.Init(fd_, extents, kBlockSize));
+ EXPECT_TRUE(
+ zero_pad_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize));
size_t bytes_to_write = data.size();
const size_t missing_bytes = (aligned_size ? 0 : 9);
bytes_to_write -= missing_bytes;
@@ -215,17 +191,9 @@
}
TEST_F(ExtentWriterTest, SparseFileTest) {
- vector<Extent> extents;
- Extent extent;
- extent.set_start_block(1);
- extent.set_num_blocks(1);
- extents.push_back(extent);
- extent.set_start_block(kSparseHole);
- extent.set_num_blocks(2);
- extents.push_back(extent);
- extent.set_start_block(0);
- extent.set_num_blocks(1);
- extents.push_back(extent);
+ vector<Extent> extents = {ExtentForRange(1, 1),
+ ExtentForRange(kSparseHole, 2),
+ ExtentForRange(0, 1)};
const int block_count = 4;
const int on_disk_count = 2;
@@ -233,7 +201,8 @@
test_utils::FillWithData(&data);
DirectExtentWriter direct_writer;
- EXPECT_TRUE(direct_writer.Init(fd_, extents, kBlockSize));
+ EXPECT_TRUE(
+ direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize));
size_t bytes_written = 0;
while (bytes_written < (block_count * kBlockSize)) {
diff --git a/payload_consumer/fake_extent_writer.h b/payload_consumer/fake_extent_writer.h
index 762c6d5..4418a9e 100644
--- a/payload_consumer/fake_extent_writer.h
+++ b/payload_consumer/fake_extent_writer.h
@@ -18,7 +18,6 @@
#define UPDATE_ENGINE_PAYLOAD_CONSUMER_FAKE_EXTENT_WRITER_H_
#include <memory>
-#include <vector>
#include <brillo/secure_blob.h>
@@ -35,7 +34,7 @@
// ExtentWriter overrides.
bool Init(FileDescriptorPtr /* fd */,
- const std::vector<Extent>& /* extents */,
+ const google::protobuf::RepeatedPtrField<Extent>& /* extents */,
uint32_t /* block_size */) override {
init_called_ = true;
return true;
diff --git a/payload_consumer/file_descriptor_utils.cc b/payload_consumer/file_descriptor_utils.cc
index f7f61a5..b092149 100644
--- a/payload_consumer/file_descriptor_utils.cc
+++ b/payload_consumer/file_descriptor_utils.cc
@@ -66,12 +66,7 @@
brillo::Blob buf(buffer_blocks * block_size);
DirectExtentWriter writer;
- std::vector<Extent> vec_tgt_extents;
- vec_tgt_extents.reserve(tgt_extents.size());
- for (const auto& ext : tgt_extents) {
- vec_tgt_extents.push_back(ext);
- }
- TEST_AND_RETURN_FALSE(writer.Init(target, vec_tgt_extents, block_size));
+ TEST_AND_RETURN_FALSE(writer.Init(target, tgt_extents, block_size));
for (const Extent& src_ext : src_extents) {
for (uint64_t src_ext_block = 0; src_ext_block < src_ext.num_blocks();
diff --git a/payload_consumer/file_descriptor_utils.h b/payload_consumer/file_descriptor_utils.h
index 6b2fd39..d1289d6 100644
--- a/payload_consumer/file_descriptor_utils.h
+++ b/payload_consumer/file_descriptor_utils.h
@@ -17,8 +17,6 @@
#ifndef UPDATE_ENGINE_PAYLOAD_CONSUMER_FILE_DESCRIPTOR_UTILS_H_
#define UPDATE_ENGINE_PAYLOAD_CONSUMER_FILE_DESCRIPTOR_UTILS_H_
-#include <vector>
-
#include <brillo/secure_blob.h>
#include "update_engine/payload_consumer/file_descriptor.h"
diff --git a/payload_consumer/file_writer_unittest.cc b/payload_consumer/file_writer_unittest.cc
index debb4c3..92837c8 100644
--- a/payload_consumer/file_writer_unittest.cc
+++ b/payload_consumer/file_writer_unittest.cc
@@ -21,7 +21,6 @@
#include <unistd.h>
#include <string>
-#include <vector>
#include <brillo/secure_blob.h>
#include <gtest/gtest.h>
@@ -30,7 +29,6 @@
#include "update_engine/common/utils.h"
using std::string;
-using std::vector;
namespace chromeos_update_engine {
diff --git a/payload_consumer/mtd_file_descriptor.cc b/payload_consumer/mtd_file_descriptor.cc
index 3f0a33f..5d7758a 100644
--- a/payload_consumer/mtd_file_descriptor.cc
+++ b/payload_consumer/mtd_file_descriptor.cc
@@ -18,11 +18,12 @@
#include <fcntl.h>
#include <mtd/ubi-user.h>
-#include <string>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <vector>
+
+#include <memory>
+#include <string>
#include <base/files/file_path.h>
#include <base/strings/string_number_conversions.h>
@@ -33,7 +34,6 @@
#include "update_engine/common/utils.h"
using std::string;
-using std::vector;
namespace {
diff --git a/payload_consumer/payload_verifier.h b/payload_consumer/payload_verifier.h
index 22ced40..8caef35 100644
--- a/payload_consumer/payload_verifier.h
+++ b/payload_consumer/payload_verifier.h
@@ -18,7 +18,6 @@
#define UPDATE_ENGINE_PAYLOAD_CONSUMER_PAYLOAD_VERIFIER_H_
#include <string>
-#include <vector>
#include <base/macros.h>
#include <brillo/secure_blob.h>
diff --git a/payload_consumer/postinstall_runner_action_unittest.cc b/payload_consumer/postinstall_runner_action_unittest.cc
index e82a866..a319299 100644
--- a/payload_consumer/postinstall_runner_action_unittest.cc
+++ b/payload_consumer/postinstall_runner_action_unittest.cc
@@ -22,7 +22,6 @@
#include <memory>
#include <string>
-#include <vector>
#include <base/bind.h>
#include <base/files/file_util.h>
@@ -44,7 +43,6 @@
using brillo::MessageLoop;
using chromeos_update_engine::test_utils::ScopedLoopbackDeviceBinder;
using std::string;
-using std::vector;
namespace chromeos_update_engine {
diff --git a/payload_consumer/xz_extent_writer.cc b/payload_consumer/xz_extent_writer.cc
index 4bd893d..343ed80 100644
--- a/payload_consumer/xz_extent_writer.cc
+++ b/payload_consumer/xz_extent_writer.cc
@@ -16,7 +16,7 @@
#include "update_engine/payload_consumer/xz_extent_writer.h"
-using std::vector;
+using google::protobuf::RepeatedPtrField;
namespace chromeos_update_engine {
@@ -47,7 +47,7 @@
return "<unknown xz error>";
}
#undef __XZ_ERROR_STRING_CASE
-};
+}
} // namespace
XzExtentWriter::~XzExtentWriter() {
@@ -55,7 +55,7 @@
}
bool XzExtentWriter::Init(FileDescriptorPtr fd,
- const vector<Extent>& extents,
+ const RepeatedPtrField<Extent>& extents,
uint32_t block_size) {
stream_ = xz_dec_init(XZ_DYNALLOC, kXzMaxDictSize);
TEST_AND_RETURN_FALSE(stream_ != nullptr);
diff --git a/payload_consumer/xz_extent_writer.h b/payload_consumer/xz_extent_writer.h
index a6b3257..5e50256 100644
--- a/payload_consumer/xz_extent_writer.h
+++ b/payload_consumer/xz_extent_writer.h
@@ -20,7 +20,7 @@
#include <xz.h>
#include <memory>
-#include <vector>
+#include <utility>
#include <brillo/secure_blob.h>
@@ -40,7 +40,7 @@
~XzExtentWriter() override;
bool Init(FileDescriptorPtr fd,
- const std::vector<Extent>& extents,
+ const google::protobuf::RepeatedPtrField<Extent>& extents,
uint32_t block_size) override;
bool Write(const void* bytes, size_t count) override;
bool EndImpl() override;
diff --git a/payload_consumer/xz_extent_writer_unittest.cc b/payload_consumer/xz_extent_writer_unittest.cc
index 47c0a58..c8bcdf9 100644
--- a/payload_consumer/xz_extent_writer_unittest.cc
+++ b/payload_consumer/xz_extent_writer_unittest.cc
@@ -22,8 +22,6 @@
#include <unistd.h>
#include <algorithm>
-#include <string>
-#include <vector>
#include <base/memory/ptr_util.h>
#include <gtest/gtest.h>
@@ -32,9 +30,6 @@
#include "update_engine/common/utils.h"
#include "update_engine/payload_consumer/fake_extent_writer.h"
-using std::string;
-using std::vector;
-
namespace chromeos_update_engine {
namespace {
diff --git a/payload_generator/zip_unittest.cc b/payload_generator/zip_unittest.cc
index 4459f40..308ba2f 100644
--- a/payload_generator/zip_unittest.cc
+++ b/payload_generator/zip_unittest.cc
@@ -31,6 +31,7 @@
#include "update_engine/payload_generator/xz.h"
using chromeos_update_engine::test_utils::kRandomString;
+using google::protobuf::RepeatedPtrField;
using std::string;
using std::vector;
@@ -50,7 +51,7 @@
~MemoryExtentWriter() override = default;
bool Init(FileDescriptorPtr fd,
- const vector<Extent>& extents,
+ const RepeatedPtrField<Extent>& extents,
uint32_t block_size) override {
return true;
}