From: Sage Weil Date: Sat, 14 May 2016 12:40:54 +0000 (-0400) Subject: os/bluestore: return EIO on csum verification error X-Git-Tag: v11.0.0~359^2~81 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aa77a05ad33644a3ece5e530fd809a58afda12db;p=ceph.git os/bluestore: return EIO on csum verification error Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 8200bb6ce88..e81cef22d3c 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -2852,8 +2852,11 @@ int BlueStore::_do_read( if (bptr->csum_type != bluestore_blob_t::CSUM_NONE) { r = _verify_csum(bptr, 0, compressed_bl); if (r < 0) { - dout(20) << __func__ << " blob reading " << r2r_it->logical_offset << "~" << bptr->length << " csum verification failed." << dendl; - return r; + dout(20) << __func__ << " blob reading 0x" << std::hex + << r2r_it->logical_offset + << " 0~" << compressed_bl.length() + << std::dec << " csum verification failed." << dendl; + return -EIO; } } @@ -2979,7 +2982,7 @@ int BlueStore::_read_extent_sparse( << cur->logical_offset << " 0x" << cur->blob_xoffset << "~0x" << bl.length() << " csum verification failed" << dendl; - return r; + return -EIO; } }