From: myoungwon oh Date: Fri, 6 Nov 2020 03:28:51 +0000 (+0900) Subject: osd: fix error handlding if flush fails X-Git-Tag: v16.1.0~374^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8cfda419739ca1a76d888751b61ebb471d3d5b76;p=ceph.git osd: fix error handlding if flush fails Signed-off-by: Myoungwon Oh --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 62dabed95438..4c2f80184779 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10184,13 +10184,6 @@ void PrimaryLogPG::finish_set_dedup(hobject_t oid, int r, ceph_tid_t tid, uint64 // if any failure occurs, put a mark on the results to recognize the failure mop->results[0] = r; } - if (mop->results[0] < 0) { - // check if the previous op returns fail - if (mop->num_chunks == mop->results.size()) { - manifest_ops.erase(oid); - } - return; - } if (mop->num_chunks != mop->results.size()) { // there are on-going works return; @@ -10204,9 +10197,11 @@ void PrimaryLogPG::finish_set_dedup(hobject_t oid, int r, ceph_tid_t tid, uint64 ceph_assert(obc->is_blocked()); obc->stop_block(); kick_object_context_blocked(obc); - if (r < 0) { - if (mop->op) - osd->reply_op_error(mop->op, r); + if (mop->results[0] < 0) { + // check if the previous op returns fail + ceph_assert(mop->num_chunks == mop->results.size()); + manifest_ops.erase(oid); + osd->reply_op_error(mop->op, mop->results[0]); return; }