Lines Matching refs:src
477 static int ReadBlocks(const RangeSet& src, std::vector<uint8_t>* buffer, int fd) { in ReadBlocks() argument
479 for (const auto& [begin, end] : src) { in ReadBlocks()
579 RangeSet src = RangeSet::Parse(params.tokens[pos++]); in PrintHashForCorruptedSourceBlocks() local
580 if (!src) { in PrintHashForCorruptedSourceBlocks()
589 locs = RangeSet(std::vector<Range>{ Range{ 0, src.blocks() } }); in PrintHashForCorruptedSourceBlocks()
596 CHECK_EQ(src.blocks(), locs.blocks()); in PrintHashForCorruptedSourceBlocks()
599 LOG(INFO) << "printing hash in hex for " << src.blocks() << " source blocks"; in PrintHashForCorruptedSourceBlocks()
600 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedSourceBlocks()
601 size_t block_num = src.GetBlockNumber(i); in PrintHashForCorruptedSourceBlocks()
616 const RangeSet& src) { in PrintHashForCorruptedStashedBlocks() argument
618 CHECK_EQ(src.blocks() * BLOCKSIZE, buffer.size()); in PrintHashForCorruptedStashedBlocks()
620 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedStashedBlocks()
621 size_t block_num = src.GetBlockNumber(i); in PrintHashForCorruptedStashedBlocks()
639 const RangeSet& src = stash_map[id]; in PrintHashForMissingStashedBlocks() local
640 std::vector<uint8_t> buffer(src.blocks() * BLOCKSIZE); in PrintHashForMissingStashedBlocks()
641 if (ReadBlocks(src, &buffer, fd) == -1) { in PrintHashForMissingStashedBlocks()
645 PrintHashForCorruptedStashedBlocks(id, buffer, src); in PrintHashForMissingStashedBlocks()
736 const RangeSet& src = stash_map[id]; in LoadStash() local
737 allocate(src.blocks() * BLOCKSIZE, buffer); in LoadStash()
739 if (ReadBlocks(src, buffer, params.fd) == -1) { in LoadStash()
743 if (VerifyBlocks(id, *buffer, src.blocks(), true) != 0) { in LoadStash()
746 PrintHashForCorruptedStashedBlocks(id, *buffer, src); in LoadStash()
794 const RangeSet& src = stash_map[id]; in LoadStash() local
795 PrintHashForCorruptedStashedBlocks(id, *buffer, src); in LoadStash()
1007 RangeSet src = RangeSet::Parse(params.tokens[params.cpos++]); in LoadSourceBlocks() local
1008 CHECK(static_cast<bool>(src)); in LoadSourceBlocks()
1009 *overlap = src.Overlaps(tgt); in LoadSourceBlocks()
1011 if (ReadBlocks(src, ¶ms.buffer, params.fd) == -1) { in LoadSourceBlocks()
1222 RangeSet src = RangeSet::Parse(params.tokens[params.cpos++]); in PerformCommandStash() local
1223 CHECK(static_cast<bool>(src)); in PerformCommandStash()
1225 size_t blocks = src.blocks(); in PerformCommandStash()
1227 if (ReadBlocks(src, ¶ms.buffer, params.fd) == -1) { in PerformCommandStash()
1230 stash_map[id] = src; in PerformCommandStash()