]> git.apps.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>
Thu, 14 Oct 2021 15:42:00 +0000 (18:42 +0300)
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 104d8df5f44cf522422914b254536f42bbe31172)

src/osd/ECBackend.cc

index a621ba3aa3ee625358cd14df86cd282884992639..b11ad496dcf0f2fd5b7fc44dacb4d3f7c67f2682 100644 (file)
@@ -2587,7 +2587,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