From: Sage Weil Date: Sat, 8 Feb 2014 02:05:04 +0000 (-0800) Subject: osd/ReplicatedPG: do not flush omap objects to an EC base pool X-Git-Tag: v0.78~166^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f854211d39edaccab0e115d5638db4536cd75b4;p=ceph.git osd/ReplicatedPG: do not flush omap objects to an EC base pool The EC pool does not support omap content. If the caching/tiering agent encounters such an object, just skip it. Use the OMAP object_info_t flag for this. Although legacy pools will have objects with omap that do not have this flag set, no *cache* pools yet exist, so we do not need to worry about the agent running across legacy content. Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 30ccea276b70..7a9edd25da19 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -10238,6 +10238,9 @@ void ReplicatedPG::agent_work(int start_max) << ", pos " << agent_state->position << dendl; + const pg_pool_t *base_pool = get_osdmap()->get_pg_pool(pool.info.tier_of); + assert(base_pool); + int ls_min = 1; int ls_max = 10; // FIXME? @@ -10281,6 +10284,13 @@ void ReplicatedPG::agent_work(int start_max) continue; } + // be careful flushing omap to an EC pool. + if (base_pool->is_erasure() && + obc->obs.oi.test_flag(object_info_t::FLAG_OMAP)) { + dout(20) << __func__ << " skip (omap to EC) " << obc->obs.oi << dendl; + continue; + } + if (agent_state->flush_mode != TierAgentState::FLUSH_MODE_IDLE && agent_maybe_flush(obc)) ++started;