}
if (agent_state) {
- agent_choose_mode();
+ if (agent_choose_mode(false, op))
+ return;
}
- if ((m->get_flags() & CEPH_OSD_FLAG_IGNORE_CACHE) == 0 &&
+ if (!(m->has_flag(CEPH_OSD_FLAG_IGNORE_CACHE)) &&
maybe_handle_cache(op, write_ordered, obc, r, missing_oid, false, in_hit_set))
return;
assert(missing_oid != hobject_t());
obc = get_object_context(missing_oid, true);
}
- dout(10) << __func__ << " " << obc->obs.oi.soid << dendl;
+ /*
+ * Before promote complete, if there are proxy-reads for the object,
+ * for this case we don't use DONTNEED.
+ */
+ unsigned src_fadvise_flags = LIBRADOS_OP_FLAG_FADVISE_SEQUENTIAL;
+ map<hobject_t, list<OpRequestRef> >::iterator q = in_progress_proxy_reads.find(obc->obs.oi.soid);
+ if (q == in_progress_proxy_reads.end()) {
+ src_fadvise_flags |= LIBRADOS_OP_FLAG_FADVISE_DONTNEED;
+ }
+
PromoteCallback *cb = new PromoteCallback(obc, this);
object_locator_t my_oloc = oloc;
my_oloc.pool = pool.info.tier_of;