From: myoungwon oh Date: Sat, 31 Oct 2020 06:04:30 +0000 (+0900) Subject: osd: return error imediately if last_peering_reset != pg->get_last_peering_reset X-Git-Tag: v16.1.0~374^2~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be4d671ba8f4e1205b6a9a7d668a4d6d83e670c7;p=ceph.git osd: return error imediately if last_peering_reset != pg->get_last_peering_reset Signed-off-by: Myoungwon Oh --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index b7d99bee7f65..dffb3948527b 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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); }