]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: put interval bounds [) in debug/log output
authorSage Weil <sage@redhat.com>
Tue, 11 Apr 2017 18:05:36 +0000 (14:05 -0400)
committerSage Weil <sage@redhat.com>
Fri, 28 Apr 2017 15:30:39 +0000 (11:30 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/osd_types.h

index 7f70424095b406b28ff210de74dfe652c42587c8..313272f071e96bd32d795418ddbfbf101d27cad3 100644 (file)
@@ -724,21 +724,21 @@ void PG::check_past_interval_bounds() const
     osd->get_superblock().oldest_map);
   if (rpib.first == rpib.second) {
     if (!past_intervals.empty()) {
-      osd->clog->error() << info.pgid << " required past_interval bounds are "
-                        << " empty " << rpib << " but past_intervals is not "
+      osd->clog->error() << info.pgid << " required past_interval bounds are"
+                        << " empty [" << rpib << ") but past_intervals is not "
                         << past_intervals;
       derr << info.pgid << " required past_interval bounds are "
-          << " empty " << rpib << " but past_intervals is not "
+          << " empty [" << rpib << ") but past_intervals is not "
           << past_intervals << dendl;
       assert(past_intervals.empty());
     }
   }
   if (past_intervals.empty()) {
-    osd->clog->error() << info.pgid << " required past_interval bounds are "
-                      << " not empty " << rpib << " but past_intervals "
+    osd->clog->error() << info.pgid << " required past_interval bounds are"
+                      << " not empty [" << rpib << ") but past_intervals "
                       << past_intervals << " is empty";
     derr << info.pgid << " required past_interval bounds are "
-        << " not empty " << rpib << " but past_intervals "
+        << " not empty [" << rpib << ") but past_intervals "
         << past_intervals << " is empty" << dendl;
     assert(!past_intervals.empty());
   }
@@ -746,21 +746,21 @@ void PG::check_past_interval_bounds() const
 
   if ((apib.first.first > rpib.first) ||
       (apib.first.second <= rpib.first)) {
-    osd->clog->error() << info.pgid << " past_intervals " << apib
-                      << " start interval does not contain the required"
-                      << " bound " << rpib << " start";
-    derr << info.pgid << " past_intervals " << apib
-        << " start interval does not contain the required"
-        << " bound " << rpib << " start" << dendl;
+    osd->clog->error() << info.pgid << " past_intervals [" << apib
+                      << ") start interval does not contain the required"
+                      << " bound [" << rpib << ") start";
+    derr << info.pgid << " past_intervals [" << apib
+        << ") start interval does not contain the required"
+        << " bound [" << rpib << ") start" << dendl;
     assert(0 == "past_interval start interval mismatch");
   }
   if (apib.second != rpib.second) {
-    osd->clog->error() << info.pgid << " past_interal bound " << apib
-                      << " end does not match required " << rpib
-                      << " end";
-    derr << info.pgid << " past_interal bound " << apib
-        << " end does not match required " << rpib
-        << " end" << dendl;
+    osd->clog->error() << info.pgid << " past_interal bound [" << apib
+                      << ") end does not match required [" << rpib
+                      << ") end";
+    derr << info.pgid << " past_interal bound [" << apib
+        << ") end does not match required [" << rpib
+        << ") end" << dendl;
     assert(0 == "past_interval end mismatch");
   }
 }
index 0908f929a7848ff83fe8bce3e221c0fe7e7cb9e0..9614444b184ce26d7bbf501c9284de29998f9dab 100644 (file)
@@ -908,6 +908,7 @@ public:
 
   void mark_clean();  ///< mark an active pg clean
 
+  /// return [start,end) bounds for required past_intervals
   static pair<epoch_t, epoch_t> get_required_past_interval_bounds(
     const pg_info_t &info,
     epoch_t oldest_map) {
index 849e66b4f26478397022038ba06760243d096807..c95e24cbd391629c79c6ca3b63d39a8070e0c94a 100644 (file)
@@ -2712,7 +2712,7 @@ public:
   }
 
   /* Return the set of epochs
-   * [(start_interval_start, start_interval_end), end) represented by the
+   * [[start_interval_start, start_interval_end), end) represented by the
    * past_interval set.  Annoyingly, pg_info_t records last_epoch_started,
    * but doesn't pin it to the start of the interval, so we have to return
    * the first interval so a user can verify that last_epoch_started falls