]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ECBackend: debug ec scrub error paths
authorSage Weil <sage@redhat.com>
Wed, 3 Jan 2018 20:19:35 +0000 (14:19 -0600)
committerDavid Zafman <dzafman@redhat.com>
Fri, 18 May 2018 16:37:56 +0000 (09:37 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit a188cb27dd0d458362181205915bf17df61595e6)

src/osd/ECBackend.cc

index 9f51b468bdb27b34dce24aa650470810bf9ea6c3..7ffd9997e5302857ed247732f9d2f549b7f47c4e 100644 (file)
@@ -2482,7 +2482,10 @@ int ECBackend::be_deep_scrub(
     if (!get_parent()->get_pool().allows_ecoverwrites()) {
       assert(hinfo->has_chunk_hash());
       if (hinfo->get_total_chunk_size() != (unsigned)pos.data_pos) {
-       dout(0) << "_scan_list  " << poid << " got incorrect size on read" << dendl;
+       dout(0) << "_scan_list  " << poid << " got incorrect size on read 0x"
+               << std::hex << pos
+               << " expected 0x" << hinfo->get_total_chunk_size() << std::dec
+               << dendl;
        o.ec_size_mismatch = true;
        return 0;
       }
@@ -2490,7 +2493,10 @@ int ECBackend::be_deep_scrub(
       if (!skip_data_digest &&
           hinfo->get_chunk_hash(get_parent()->whoami_shard().shard) !=
          pos.data_hash.digest()) {
-       dout(0) << "_scan_list  " << poid << " got incorrect hash on read" << dendl;
+       dout(0) << "_scan_list  " << poid << " got incorrect hash on read 0x"
+               << std::hex << pos.data_hash.digest() << " !=  expected 0x"
+               << hinfo->get_chunk_hash(get_parent()->whoami_shard().shard)
+               << std::dec << dendl;
        o.ec_hash_mismatch = true;
        return 0;
       }