Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
return false;
}
- op->using_cache = pipeline_state.caching_enabled();
-
- if (op->invalidates_cache()) {
+ if (!pipeline_state.caching_enabled()) {
+ op->using_cache = false;
+ } else if (op->invalidates_cache()) {
dout(20) << __func__ << ": invalidating cache after this op"
<< dendl;
pipeline_state.invalidate();
bool invalidates_cache() const { return plan.invalidates_cache; }
// must be true if requires_rmw(), must be false if invalidates_cache()
- bool using_cache = false;
+ bool using_cache = true;
/// In progress read state;
map<hobject_t,extent_set> pending_read; // subset already being read