]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PGBackend: Don't change error type from DEEP_ERROR to SHALLOW_ERROR.
authorJianpeng Ma <jianpeng.ma@intel.com>
Wed, 23 Sep 2015 05:40:35 +0000 (13:40 +0800)
committerDavid Zafman <dzafman@redhat.com>
Mon, 4 Jan 2016 19:16:48 +0000 (11:16 -0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/osd/PGBackend.cc

index b53166da2cfb9ca75432e9109bc798ea6caaf8f9..8d6a098382e65fbf0843786a82ea05329857a4d5 100644 (file)
@@ -409,7 +409,8 @@ enum scrub_error_type PGBackend::be_compare_scrub_objects(
   if (auth.size != candidate.size) {
     if (error != CLEAN)
       errorstream << ", ";
-    error = SHALLOW_ERROR;
+    if (error != DEEP_ERROR)
+      error = SHALLOW_ERROR;
     bool known = auth.size == be_get_ondisk_size(auth_oi.size);
     errorstream << "size " << candidate.size
                << " != "
@@ -422,12 +423,14 @@ enum scrub_error_type PGBackend::be_compare_scrub_objects(
     if (!candidate.attrs.count(i->first)) {
       if (error != CLEAN)
         errorstream << ", ";
-      error = SHALLOW_ERROR;
+      if (error != DEEP_ERROR)
+       error = SHALLOW_ERROR;
       errorstream << "missing attr " << i->first;
     } else if (candidate.attrs.find(i->first)->second.cmp(i->second)) {
       if (error != CLEAN)
         errorstream << ", ";
-      error = SHALLOW_ERROR;
+      if (error != DEEP_ERROR)
+       error = SHALLOW_ERROR;
       errorstream << "attr value mismatch " << i->first;
     }
   }
@@ -437,7 +440,8 @@ enum scrub_error_type PGBackend::be_compare_scrub_objects(
     if (!auth.attrs.count(i->first)) {
       if (error != CLEAN)
         errorstream << ", ";
-      error = SHALLOW_ERROR;
+      if (error != DEEP_ERROR)
+       error = SHALLOW_ERROR;
       errorstream << "extra attr " << i->first;
     }
   }