]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: no need to crash in deep scrub if hash info is invalid
authorMykola Golub <mgolub@suse.com>
Tue, 21 Sep 2021 10:28:31 +0000 (11:28 +0100)
committerMykola Golub <mgolub@suse.com>
Tue, 21 Sep 2021 10:31:37 +0000 (11:31 +0100)
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/osd/ECBackend.cc

index d9d2b5ae1be73a42b538dcd1821e72b938ab107e..15bb059033abf278117ee091d12d8f301408f764 100644 (file)
@@ -2588,7 +2588,11 @@ int ECBackend::be_deep_scrub(
     return 0;
   } else {
     if (!get_parent()->get_pool().allows_ecoverwrites()) {
-      ceph_assert(hinfo->has_chunk_hash());
+      if (!hinfo->has_chunk_hash()) {
+        dout(0) << "_scan_list  " << poid << " got invalid hash info" << dendl;
+        o.ec_size_mismatch = true;
+        return 0;
+      }
       if (hinfo->get_total_chunk_size() != (unsigned)pos.data_pos) {
        dout(0) << "_scan_list  " << poid << " got incorrect size on read 0x"
                << std::hex << pos