]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clean up scrub method debug output
authorSage Weil <sage@redhat.com>
Tue, 9 Dec 2014 21:43:53 +0000 (13:43 -0800)
committerSage Weil <sage@redhat.com>
Sat, 20 Dec 2014 15:17:39 +0000 (07:17 -0800)
Use __func__ instead of (usually inaccurate) names.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PGBackend.cc
src/osd/ReplicatedBackend.cc

index 197abcf941ca7c32d8a79ec4f93b886c35602258..f202b8dfc47bc7995d5499c56cfd970455ceb96e 100644 (file)
@@ -3564,8 +3564,7 @@ int PG::build_scrub_map_chunk(
   hobject_t start, hobject_t end, bool deep,
   ThreadPool::TPHandle &handle)
 {
-  dout(10) << "build_scrub_map" << dendl;
-  dout(20) << "scrub_map_chunk [" << start << "," << end << ")" << dendl;
+  dout(10) << __func__ << " [" << start << "," << end << ")" << dendl;
 
   map.valid_through = info.last_update;
 
@@ -3588,8 +3587,7 @@ int PG::build_scrub_map_chunk(
   _scan_rollback_obs(rollback_obs, handle);
   _scan_snaps(map);
 
-  dout(10) << __func__ << " done." << dendl;
-
+  dout(20) << __func__ << " done" << dendl;
   return 0;
 }
 
@@ -4156,13 +4154,13 @@ bool PG::scrub_gather_replica_maps()
 
 void PG::scrub_compare_maps() 
 {
-  dout(10) << "scrub_compare_maps has maps, analyzing" << dendl;
+  dout(10) << __func__ << " has maps, analyzing" << dendl;
 
   // construct authoritative scrub map for type specific scrubbing
   ScrubMap authmap(scrubber.primary_scrubmap);
 
   if (acting.size() > 1) {
-    dout(10) << "scrub  comparing replica scrub maps" << dendl;
+    dout(10) << __func__ << "  comparing replica scrub maps" << dendl;
 
     stringstream ss;
 
@@ -4170,7 +4168,7 @@ void PG::scrub_compare_maps()
     map<hobject_t, pg_shard_t> authoritative;
     map<pg_shard_t, ScrubMap *> maps;
 
-    dout(2) << "scrub   osd." << acting[0] << " has " 
+    dout(2) << __func__ << "   osd." << acting[0] << " has "
            << scrubber.primary_scrubmap.objects.size() << " items" << dendl;
     maps[pg_whoami] = &scrubber.primary_scrubmap;
 
@@ -4178,7 +4176,7 @@ void PG::scrub_compare_maps()
         i != actingbackfill.end();
         ++i) {
       if (*i == pg_whoami) continue;
-      dout(2) << "scrub replica " << *i << " has "
+      dout(2) << __func__ << " replica " << *i << " has "
              << scrubber.received_maps[*i].objects.size()
              << " items" << dendl;
       maps[*i] = &scrubber.received_maps[*i];
index fd5ba5ce10f7a25377b8f767c4b745b039524f91..3c50d895e27cdda60b98955974f7c60b53a0cb17 100644 (file)
@@ -323,7 +323,7 @@ void PGBackend::be_scan_list(
   ScrubMap &map, const vector<hobject_t> &ls, bool deep,
   ThreadPool::TPHandle &handle)
 {
-  dout(10) << "_scan_list scanning " << ls.size() << " objects"
+  dout(10) << __func__ << " scanning " << ls.size() << " objects"
            << (deep ? " deeply" : "") << dendl;
   int i = 0;
   for (vector<hobject_t>::const_iterator p = ls.begin();
@@ -354,15 +354,17 @@ void PGBackend::be_scan_list(
        be_deep_scrub(*p, o, handle);
       }
 
-      dout(25) << "_scan_list  " << poid << dendl;
+      dout(25) << __func__ << "  " << poid << dendl;
     } else if (r == -ENOENT) {
-      dout(25) << "_scan_list  " << poid << " got " << r << ", skipping" << dendl;
+      dout(25) << __func__ << "  " << poid << " got " << r
+              << ", skipping" << dendl;
     } else if (r == -EIO) {
-      dout(25) << "_scan_list  " << poid << " got " << r << ", read_error" << dendl;
+      dout(25) << __func__ << "  " << poid << " got " << r
+              << ", read_error" << dendl;
       ScrubMap::object &o = map.objects[poid];
       o.read_error = true;
     } else {
-      derr << "_scan_list got: " << cpp_strerror(r) << dendl;
+      derr << __func__ << " got: " << cpp_strerror(r) << dendl;
       assert(0);
     }
   }
index 34a4db448d7e5b6efa93585450165913561f263f..e19ad4b0465ee21fe004c80e35a7ac5eab88ceaa 100644 (file)
@@ -694,7 +694,8 @@ void ReplicatedBackend::sub_op_modify_reply(OpRequestRef op)
 void ReplicatedBackend::be_deep_scrub(
   const hobject_t &poid,
   ScrubMap::object &o,
-  ThreadPool::TPHandle &handle) {
+  ThreadPool::TPHandle &handle)
+{
   bufferhash h, oh;
   bufferlist bl, hdrbl;
   int r;
@@ -712,7 +713,7 @@ void ReplicatedBackend::be_deep_scrub(
     bl.clear();
   }
   if (r == -EIO) {
-    dout(25) << "_scan_list  " << poid << " got "
+    dout(25) << __func__ << "  " << poid << " got "
             << r << " on read, read_error" << dendl;
     o.read_error = true;
   }
@@ -732,7 +733,7 @@ void ReplicatedBackend::be_deep_scrub(
     oh << bl;
     bl.clear();
   } else if (r == -EIO) {
-    dout(25) << "_scan_list  " << poid << " got "
+    dout(25) << __func__ << "  " << poid << " got "
             << r << " on omap header read, read_error" << dendl;
     o.read_error = true;
   }
@@ -759,7 +760,7 @@ void ReplicatedBackend::be_deep_scrub(
     bl.clear();
   }
   if (iter->status() == -EIO) {
-    dout(25) << "_scan_list  " << poid << " got "
+    dout(25) << __func__ << "  " << poid << " got "
             << r << " on omap scan, read_error" << dendl;
     o.read_error = true;
   }