]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: return error imediately if last_peering_reset != pg->get_last_peering_reset
authormyoungwon oh <ohmyoungwon@gmail.com>
Sat, 31 Oct 2020 06:04:30 +0000 (15:04 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Sat, 31 Oct 2020 06:04:30 +0000 (15:04 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/osd/PrimaryLogPG.cc

index b7d99bee7f65567cc05dc6c7f94e2daef621e950..dffb3948527b5b3f7bd672779e2a927dbfdc215d 100644 (file)
@@ -9997,6 +9997,9 @@ struct C_SetDedupChunks : public Context {
     if (r == -ECANCELED)
       return;
     std::scoped_lock locker{*pg};
+    if (last_peering_reset != pg->get_last_peering_reset()) {
+      return;
+    }
     auto it = pg->manifest_ops.find(oid);
     if (it == pg->manifest_ops.end()) {
       // raced with cancel_manifest_ops
@@ -10018,8 +10021,6 @@ struct C_SetDedupChunks : public Context {
     } else {
       // if any failure occurs, put a mark on the results to recognize the failure
       it->second->results[0] = r;
-      if (last_peering_reset != pg->get_last_peering_reset()) 
-       it->second->results[0] = -EINVAL;
     }
     pg->manifest_ops.erase(it);
   }