]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix error handlding if flush fails
authormyoungwon oh <ohmyoungwon@gmail.com>
Fri, 6 Nov 2020 03:28:51 +0000 (12:28 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Fri, 6 Nov 2020 03:28:51 +0000 (12:28 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/osd/PrimaryLogPG.cc

index 62dabed95438c88e0f6f3c39f115fad5bb4ca03a..4c2f801847794eb496b26486aa1e87ead9793607 100644 (file)
@@ -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;
   }