@@ -20,7 +20,7 @@ Reader::Reader(SequentialFile* file, Reporter* reporter, bool checksum,
2020 : file_(file),
2121 reporter_ (reporter),
2222 checksum_(checksum),
23- backing_store_(new char [kBlockSize ]),
23+ backing_store_(new char [port:: kLogBlockSize ]),
2424 buffer_(),
2525 eof_(false ),
2626 last_record_offset_(0 ),
@@ -31,12 +31,12 @@ Reader::Reader(SequentialFile* file, Reporter* reporter, bool checksum,
3131Reader::~Reader () { delete[] backing_store_; }
3232
3333bool Reader::SkipToInitialBlock () {
34- const size_t offset_in_block = initial_offset_ % kBlockSize ;
34+ const size_t offset_in_block = initial_offset_ % port:: kLogBlockSize ;
3535 uint64_t block_start_location = initial_offset_ - offset_in_block;
3636
3737 // Don't search a block if we'd be in the trailer
38- if (offset_in_block > kBlockSize - 6 ) {
39- block_start_location += kBlockSize ;
38+ if (offset_in_block > port:: kLogBlockSize - 6 ) {
39+ block_start_location += port:: kLogBlockSize ;
4040 }
4141
4242 end_of_buffer_offset_ = block_start_location;
@@ -192,14 +192,14 @@ unsigned int Reader::ReadPhysicalRecord(Slice* result) {
192192 if (!eof_) {
193193 // Last read was a full read, so this is a trailer to skip
194194 buffer_.clear ();
195- Status status = file_->Read (kBlockSize , &buffer_, backing_store_);
195+ Status status = file_->Read (port:: kLogBlockSize , &buffer_, backing_store_);
196196 end_of_buffer_offset_ += buffer_.size ();
197197 if (!status.ok ()) {
198198 buffer_.clear ();
199- ReportDrop (kBlockSize , status);
199+ ReportDrop (port:: kLogBlockSize , status);
200200 eof_ = true ;
201201 return kEof ;
202- } else if (buffer_.size () < kBlockSize ) {
202+ } else if (buffer_.size () < port:: kLogBlockSize ) {
203203 eof_ = true ;
204204 }
205205 continue ;
0 commit comments