]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg_interval_interrupt_condition: use new logging macros
authorSamuel Just <sjust@redhat.com>
Wed, 25 Jan 2023 05:33:07 +0000 (21:33 -0800)
committerSamuel Just <sjust@redhat.com>
Sat, 28 Jan 2023 01:20:47 +0000 (01:20 +0000)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/pg_interval_interrupt_condition.cc

index b7b6af981a268ec973d7087db0e78baef5298132..36243b825752506a49b2e19f9eca1e934cec4018 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "crimson/common/log.h"
 
+SET_SUBSYS(osd);
+
 namespace crimson::osd {
 
 IOInterruptCondition::IOInterruptCondition(Ref<PG>& pg)
@@ -17,17 +19,20 @@ IOInterruptCondition::~IOInterruptCondition() {
 }
 
 bool IOInterruptCondition::new_interval_created() {
-  bool ret = e < pg->get_interval_start_epoch();
-  if (ret)
-    ::crimson::get_logger(ceph_subsys_osd).debug(
-      "{} new interval, should interrupt, e{}", *pg, e);
+  LOG_PREFIX(IOInterruptCondition::new_interval_created);
+  const epoch_t interval_start = pg->get_interval_start_epoch();
+  bool ret = e < interval_start;
+  if (ret) {
+    DEBUGDPP("stored interval e{} < interval_start e{}", *pg, e, interval_start);
+  }
   return ret;
 }
 
 bool IOInterruptCondition::is_stopping() {
-  if (pg->stopping)
-    ::crimson::get_logger(ceph_subsys_osd).debug(
-      "{} shutting down, should interrupt", *pg);
+  LOG_PREFIX(IOInterruptCondition::is_stopping);
+  if (pg->stopping) {
+    DEBUGDPP("pg stopping", *pg);
+  }
   return pg->stopping;
 }