osd: no need to crash in deep scrub if hash info is invalid

Signed-off-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
Mykola Golub 2021-09-21 11:28:31 +01:00
parent ffd4d1c34a
commit 104d8df5f4

View 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