From: Sage Weil Date: Mon, 6 Jan 2014 01:44:49 +0000 (-0800) Subject: osd/ReplicatedPG: cleanly abort flush if the object no longer exists X-Git-Tag: v0.77~22^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8221a2a54dc04fa65757c2e95e89404d76859a1e;p=ceph.git osd/ReplicatedPG: cleanly abort flush if the object no longer exists If the object no longer exists (for example, because the snap trimmer just killed it) clean up the flush state without trying to mark the object clean. Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 208f6d3e475..3d4531a69f1 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5489,10 +5489,15 @@ int ReplicatedPG::try_flush_mark_clean(FlushOpRef fop) ObjectContextRef obc = fop->ctx->obc; const hobject_t& oid = obc->obs.oi.soid; - if (fop->flushed_version != obc->obs.oi.user_version) { - dout(10) << __func__ << " flushed_version " << fop->flushed_version - << " != current " << obc->obs.oi.user_version - << dendl; + if (fop->flushed_version != obc->obs.oi.user_version || + !obc->obs.exists) { + if (obc->obs.exists) + dout(10) << __func__ << " flushed_version " << fop->flushed_version + << " != current " << obc->obs.oi.user_version + << dendl; + else + dout(10) << __func__ << " object no longer exists" << dendl; + if (!fop->dup_ops.empty()) { dout(20) << __func__ << " requeueing dups" << dendl; requeue_ops(fop->dup_ops);