diff mbox

[2/2] osd: optimize PG::should_restart_peering()

Message ID 1527500180-17479-3-git-send-email-kouya@jp.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kouya Shimura May 28, 2018, 9:36 a.m. UTC
PG::should_restart_peering() is called twice in state transitions.
This patch avoid duplicate evaluation of PastIntervals::is_new_interval().

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
---
 src/osd/PG.cc | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index 13ed169..3b64257 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -5761,6 +5761,7 @@  bool PG::should_restart_peering(
 	info.pgid.pgid)) {
     dout(20) << "new interval newup " << newup
 	     << " newacting " << newacting << dendl;
+    restart_peering = true;
     return true;
   } else {
     return false;