From 4a7f0075fe73fc122bb04f37e6467a780b10c2b8 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Wed, 23 Sep 2015 13:40:35 +0800 Subject: [PATCH] osd/PGBackend: Don't change error type from DEEP_ERROR to SHALLOW_ERROR. Signed-off-by: Jianpeng Ma --- src/osd/PGBackend.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index b53166da2cfb9..8d6a098382e65 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -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; } } -- 2.39.5