]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: minor logging changes
authorRonen Friedman <rfriedma@redhat.com>
Mon, 24 Oct 2022 13:33:23 +0000 (16:33 +0300)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 11 Dec 2022 15:27:42 +0000 (17:27 +0200)
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PG.cc
src/osd/PrimaryLogPG.cc
src/osd/scrubber/osd_scrub_sched.h
src/osd/scrubber/pg_scrubber.cc
src/osd/scrubber/scrub_backend.cc

index 1887c33cde5e70363f888d876ac63e3342af65b6..38cf71565459478016434bbdbdc192cdfefe89ec 100644 (file)
@@ -1737,9 +1737,9 @@ void PG::on_new_interval()
   projected_last_update = eversion_t();
   cancel_recovery();
 
-  assert(m_scrubber);
+  ceph_assert(m_scrubber);
   // log some scrub data before we react to the interval
-  dout(30) << __func__ << (is_scrub_queued_or_active() ? " scrubbing " : " ")
+  dout(20) << __func__ << (is_scrub_queued_or_active() ? " scrubbing " : " ")
            << "flags: " << m_planned_scrub << dendl;
 
   m_scrubber->on_primary_change(__func__, m_planned_scrub);
index 26dbac6d526e147163d38de0b6166f7ab4769654..c8f32bfb9b18c70aa1f069569f21488c56e642d4 100644 (file)
@@ -3626,6 +3626,7 @@ bool PrimaryLogPG::inc_refcount_by_set(OpContext* ctx, object_manifest_t& set_ch
        mop->tids[offset] = tid;
 
        if (!ctx->obc->is_blocked()) {
+          dout(15) << fmt::format("{}: blocking object on rc: tid:{}", __func__, tid) << dendl;
          ctx->obc->start_block();
        }
        need_inc_ref = true;
@@ -9391,6 +9392,7 @@ void PrimaryLogPG::start_copy(CopyCallback *cb, ObjectContextRef obc,
                           mirror_snapset, src_obj_fadvise_flags,
                           dest_obj_fadvise_flags));
   copy_ops[dest] = cop;
+  dout(20) << fmt::format("{}: blocking {}", __func__, dest) << dendl;
   obc->start_block();
 
   if (!obc->obs.oi.has_manifest()) {
@@ -10841,8 +10843,10 @@ int PrimaryLogPG::start_flush(
     }
   }
 
-  if (blocking)
+  if (blocking) {
+    dout(20) << fmt::format("{}: blocking {}", __func__, soid) << dendl;
     obc->start_block();
+  }
 
   map<hobject_t,FlushOpRef>::iterator p = flush_ops.find(soid);
   if (p != flush_ops.end()) {
index 70e5289f8ed0706723f3e1b1b7dbd3e626550433..17cd0e49377b2bf63cbdc4569430ca769572ad23 100644 (file)
@@ -77,7 +77,7 @@
 └─────────────────────────────────┘
 
 
-SqrubQueue interfaces (main functions):
+ScrubQueue interfaces (main functions):
 
 <1> - OSD/PG resources management:
 
@@ -340,7 +340,7 @@ class ScrubQueue {
   void register_with_osd(ScrubJobRef sjob, const sched_params_t& suggested);
 
   /**
-   * modify a scrub-job's schduled time and deadline
+   * modify a scrub-job's scheduled time and deadline
    *
    * There are 3 argument combinations to consider:
    * - 'must' is asserted, and the suggested time is 'scrub_must_stamp':
@@ -468,7 +468,7 @@ class ScrubQueue {
   mutable ceph::mutex resource_lock =
     ceph::make_mutex("ScrubQueue::resource_lock");
 
-  // the counters used to manage scrub activity parallelism:
+  /// the counters used to manage scrub activity parallelism:
   int scrubs_local{0};
   int scrubs_remote{0};
 
index 79dfc60c007fe1a5ac29a44cdd59cdf183499fa6..7fb05d0f0471ed38dbe37380ebacdee6124091f5 100644 (file)
@@ -2390,7 +2390,7 @@ const OSDMapRef& PgScrubber::get_osdmap() const
   return m_pg->get_osdmap();
 }
 
-LoggerSinkSet& PgScrubber::get_logger() const { return*m_osds->clog.get(); }
+LoggerSinkSet& PgScrubber::get_logger() const { return *m_osds->clog.get(); }
 
 ostream &operator<<(ostream &out, const PgScrubber &scrubber) {
   return out << scrubber.m_flags;
@@ -2799,7 +2799,7 @@ ReplicaReservations::no_reply_t::~no_reply_t()
 LocalReservation::LocalReservation(OSDService* osds) : m_osds{osds}
 {
   if (m_osds->get_scrub_services().inc_scrubs_local()) {
-    // the failure is signalled by not having m_holding_local_reservation set
+    // a failure is signalled by not having m_holding_local_reservation set
     m_holding_local_reservation = true;
   }
 }
index 10adbe2c56e261b0b99fd1eb97408fe115acc3bd..a560838e7891002da6f837cc79384b6d6a5bd21c 100644 (file)
@@ -491,7 +491,7 @@ auth_selection_t ScrubBackend::select_auth_object(const hobject_t& ho,
           (shard_ret.oi.version == auth_version &&
            dcount(shard_ret.oi) > dcount(ret_auth.auth_oi))) {
 
-        dout(30) << fmt::format("{}: using {} moved auth oi {:p} <-> {:p}",
+        dout(20) << fmt::format("{}: using {} moved auth oi {:p} <-> {:p}",
                                 __func__,
                                 l,
                                 (void*)&ret_auth.auth_oi,
@@ -565,7 +565,7 @@ shard_as_auth_t ScrubBackend::possible_auth_shard(const hobject_t& obj,
                                                   const pg_shard_t& srd,
                                                   shard_info_map_t& shard_map)
 {
-  //  'maps' (called with this_chunk->maps originaly): this_chunk->maps
+  //  'maps' (originally called with this_chunk->maps): this_chunk->maps
   //  'auth_oi' (called with 'auth_oi', which wasn't initialized at call site)
   //     - create and return
   //  'shard_map' - the one created in select_auth_object()