From: Zhiqiang Wang Date: Thu, 12 Mar 2015 06:26:11 +0000 (+0800) Subject: osd: skip promotion for flush/evict op X-Git-Tag: v9.0.1~38^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a5b7decbfb1440a941ec6ffa177be0c688259a11;p=ceph.git osd: skip promotion for flush/evict op In the cases when issuing flush/evict op on an object which is not in the cache tier, there is no need to promote the object or proxy/redirect the op. Signed-off-by: Zhiqiang Wang --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c5cc613b635c..8946376b2fe2 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -8677,6 +8677,14 @@ int OSD::init_op_flags(OpRequestRef& op) } break; + case CEPH_OSD_OP_CACHE_TRY_FLUSH: + case CEPH_OSD_OP_CACHE_FLUSH: + case CEPH_OSD_OP_CACHE_EVICT: + // If try_flush/flush/evict is the only op, no need to promote. + if (m->ops.size() == 1) { + op->set_skip_promote(); + } + default: break; }