From: Greg Farnum Date: Mon, 12 May 2014 23:37:16 +0000 (-0700) Subject: OSD: verify that client ops are targeted correctly in the current epoch X-Git-Tag: v0.82~73^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9f0825ca13320187ee9d763160ea2f49738f83f2;p=ceph.git OSD: verify that client ops are targeted correctly in the current epoch We were previously only looking at the epoch the op was sent in, which meant that if we had dropped responsibility somewhere between send_epoch and our current epoch, we would queue up the op until a new osdmap came along. If it never did, we could block all client IO against us... Fixes: #8338 Signed-off-by: Greg Farnum --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 220eac652723..143d992048d1 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7857,6 +7857,13 @@ void OSD::handle_op(OpRequestRef op, OSDMapRef osdmap) return; } + // check against current map too + if (!osdmap->have_pg_pool(pgid.pool()) || + osdmap->get_pg_acting_role(pgid.pgid, whoami) < 0) { + dout(7) << "dropping; no longer have PG (or pool); client will retarget" << dendl; + return; + } + PG *pg = get_pg_or_queue_for_pg(pgid, op); if (pg) { op->send_map_update = share_map.should_send;