Merge pull request #7537 from ifed01/wip-no-promote-for-delete-fix

osd: fix unnecessary object promotion when deleting from cache pool

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-02-11 08:44:35 -05:00
commit cc2200c5e6

View File

@ -2147,7 +2147,7 @@ ReplicatedPG::cache_result_t ReplicatedPG::maybe_handle_cache_detail(
return cache_result_t::BLOCKED_FULL;
}
if (!hit_set) {
if (!hit_set && (must_promote || !op->need_skip_promote()) ) {
promote_object(obc, missing_oid, oloc, op, promote_obc);
return cache_result_t::BLOCKED_PROMOTE;
} else if (op->may_write() || op->may_cache()) {