Merge "snapuserd: Remove dead code from legacy snapuserd."
This commit is contained in:
commit
f16b2f7988
2 changed files with 2 additions and 12 deletions
|
@ -509,10 +509,8 @@ bool Snapuserd::ReadMetadata() {
|
|||
// in the file.
|
||||
//===========================================================
|
||||
uint64_t block_source = cow_op->source;
|
||||
uint64_t block_offset = 0;
|
||||
if (prev_id.has_value()) {
|
||||
if (dest_blocks.count(cow_op->new_block) || source_blocks.count(block_source) ||
|
||||
(block_offset > 0 && source_blocks.count(block_source + 1))) {
|
||||
if (dest_blocks.count(cow_op->new_block) || source_blocks.count(block_source)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -520,9 +518,6 @@ bool Snapuserd::ReadMetadata() {
|
|||
pending_ordered_ops -= 1;
|
||||
vec.push_back(cow_op);
|
||||
dest_blocks.insert(block_source);
|
||||
if (block_offset > 0) {
|
||||
dest_blocks.insert(block_source + 1);
|
||||
}
|
||||
source_blocks.insert(cow_op->new_block);
|
||||
prev_id = cow_op->new_block;
|
||||
cowop_rm_iter->Next();
|
||||
|
|
|
@ -173,16 +173,11 @@ ReadAheadThread::ReadAheadThread(const std::string& cow_device, const std::strin
|
|||
|
||||
void ReadAheadThread::CheckOverlap(const CowOperation* cow_op) {
|
||||
uint64_t source_block = cow_op->source;
|
||||
uint64_t source_offset = 0;
|
||||
if (dest_blocks_.count(cow_op->new_block) || source_blocks_.count(source_block) ||
|
||||
(source_offset > 0 && source_blocks_.count(source_block + 1))) {
|
||||
if (dest_blocks_.count(cow_op->new_block) || source_blocks_.count(source_block)) {
|
||||
overlap_ = true;
|
||||
}
|
||||
|
||||
dest_blocks_.insert(source_block);
|
||||
if (source_offset > 0) {
|
||||
dest_blocks_.insert(source_block + 1);
|
||||
}
|
||||
source_blocks_.insert(cow_op->new_block);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue