[block-cache] When changing validators the new validator check fn was only being called if the block was dirty.

This commit is contained in:
Joe Thornber
2014-08-21 14:22:14 +01:00
parent b5a9cd6043
commit 6f760ccd87

View File

@@ -564,10 +564,9 @@ block_cache::lookup_or_read_block(block_address index, unsigned flags,
if (flags & GF_ZERO) if (flags & GF_ZERO)
zero_block(*b); zero_block(*b);
else { else {
if (b->v_.get() && if (b->v_.get() != v.get()) {
b->v_.get() != v.get() && if (b->test_flags(BF_DIRTY))
b->test_flags(BF_DIRTY)) { b->v_->prepare(b->data_, b->index_);
b->v_->prepare(b->data_, b->index_);
v->check(b->data_, b->index_); v->check(b->data_, b->index_);
} }
} }