]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PGStateUtils: initialize NamedState::enter_time. 33813/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 10 Mar 2020 04:01:25 +0000 (12:01 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 12 Mar 2020 12:24:39 +0000 (20:24 +0800)
This bug introduce by d96c907.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/osd/PGStateUtils.cc

index 98becffea297ce510fc0067ddcabfda4f0c71f36..fb5e1976ed70d5f802886f3c1d8f3b9ee31265cb 100644 (file)
@@ -6,9 +6,9 @@
 
 /*------NamedState----*/
 NamedState::NamedState(PGStateHistory *pgsh, const char *state_name)
-  : pgsh(pgsh), state_name(state_name) {
+  : pgsh(pgsh), state_name(state_name), enter_time(ceph_clock_now()) {
   if(pgsh) {
-    pgsh->enter(ceph_clock_now(), state_name);
+    pgsh->enter(enter_time, state_name);
   }
 }