]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd rados command: Change error name snapset_mismatch to snapset_error
authorDavid Zafman <dzafman@redhat.com>
Wed, 4 Apr 2018 22:58:57 +0000 (15:58 -0700)
committerDavid Zafman <dzafman@redhat.com>
Wed, 11 Apr 2018 16:34:52 +0000 (09:34 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 007cb45fe5c8fd1ffb8db2422a11d67d74bbf5b5)

Conflicts:
doc/rados/command/list-inconsistent-snap.json (trivial)
src/common/scrub_types.h (trivial)
src/include/rados/rados_types.hpp (trivial)
src/tools/rados/rados.cc (trivial)

doc/rados/command/list-inconsistent-snap.json
qa/standalone/scrub/osd-scrub-snaps.sh
src/common/scrub_types.cc
src/common/scrub_types.h
src/include/rados/rados_types.hpp
src/osd/PrimaryLogPG.cc
src/tools/rados/rados.cc

index 76bb478cfafbc3b4a12d780edcf20b9439361550..22044719f0bbaabcb5cfd8227c08506b9c9c3607 100644 (file)
@@ -44,7 +44,7 @@
                 "snapset_corrupted",
                 "info_missing",
                 "info_corrupted",
-                "snapset_mismatch",
+                "snapset_error",
                 "head_mismatch",
                 "headless",
                 "size_mismatch",
index 47e86e96b4860f28f84e8cb65a97d100d438dfaf..de3dc71e98e93661015e61d51a8b5f2a81e675aa 100755 (executable)
@@ -393,7 +393,7 @@ function TEST_scrub_snaps() {
     },
     {
       "errors": [
-        "snapset_mismatch"
+        "snapset_error"
       ],
       "snap": "head",
       "locator": "",
index cb961b1d729399039407836dc86b201c315fe8b9..149078518b3ff40fa0e59e5a7edbb2aad2cd6aea 100644 (file)
@@ -216,9 +216,9 @@ void inconsistent_snapset_wrapper::set_clone(snapid_t snap)
   clones.push_back(snap);
 }
 
-void inconsistent_snapset_wrapper::set_snapset_mismatch()
+void inconsistent_snapset_wrapper::set_snapset_error()
 {
-  errors |= inc_snapset_t::SNAP_MISMATCH;
+  errors |= inc_snapset_t::SNAP_ERROR;
 }
 
 void inconsistent_snapset_wrapper::set_head_mismatch()
index 5f16ad79e7f34c135e6dfa0e924a2b28f81653c2..1309a606084d96df8d8379fce053d5b4cb3f6121 100644 (file)
@@ -160,7 +160,7 @@ struct inconsistent_snapset_wrapper : public librados::inconsistent_snapset_t {
   // Clones that are there
   void set_clone(snapid_t);
   // the snapset is not consistent with itself
-  void set_snapset_mismatch();
+  void set_snapset_error();
   // soid.snap inconsistent with snapset
   void set_head_mismatch();
   void set_size_mismatch();
index 652fbe1b18687cd4ae8799d922c414f6c9ea0cfc..7cd1cd33f942db369bbdcf884d84ee3ec9be44ed 100644 (file)
@@ -250,7 +250,7 @@ struct inconsistent_snapset_t {
     SNAPSET_MISSING = 1 << 0,
     SNAPSET_CORRUPTED = 1 << 1,
     CLONE_MISSING  = 1 << 2,
-    SNAP_MISMATCH  = 1 << 3,
+    SNAP_ERROR  = 1 << 3,
     HEAD_MISMATCH  = 1 << 4,
     HEADLESS_CLONE = 1 << 5,
     SIZE_MISMATCH  = 1 << 6,
@@ -281,8 +281,11 @@ struct inconsistent_snapset_t {
   bool clone_missing() const  {
     return errors & CLONE_MISSING;
   }
-  bool snapset_mismatch() const {
-    return errors & SNAP_MISMATCH;
+  bool snapset_mismatch() const {    // Compatibility
+    return errors & SNAP_ERROR;
+  }
+  bool snapset_error() const {
+    return errors & SNAP_ERROR;
   }
   bool head_mismatch() const {
     return errors & HEAD_MISMATCH;
index 771bd8083646b589042d5571a41a74e19b1a9fc8..dc393c463100510b5bd026d3aa3e413a7d229b0c 100644 (file)
@@ -14004,7 +14004,7 @@ void PrimaryLogPG::scrub_snapshot_metadata(
            osd->clog->error() << mode << " " << info.pgid << " " << soid
                               << " snaps.seq not set";
            ++scrubber.shallow_errors;
-           head_error.set_snapset_mismatch();
+           head_error.set_snapset_error();
           }
        }
 
index 0e9d0e89d28828ba9e8760ceabc9456361eb74f0..4a0a3d73a02a8547e7de66e106a46be23993e712 100644 (file)
@@ -1542,8 +1542,8 @@ static void dump_inconsistent(const inconsistent_snapset_t& inc,
     f.dump_string("error", "info_missing");
   if (inc.info_corrupted())
     f.dump_string("error", "info_corrupted");
-  if (inc.snapset_mismatch())
-    f.dump_string("error", "snapset_mismatch");
+  if (inc.snapset_error())
+    f.dump_string("error", "snapset_error");
   if (inc.head_mismatch())
     f.dump_string("error", "head_mismatch");
   if (inc.headless())