From: xie xingguo Date: Thu, 25 Feb 2016 07:04:56 +0000 (+0000) Subject: os/filestore: make sloppy_crc can catch fatal error for read() X-Git-Tag: v10.1.0~41^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=736a94413f3ac8af184e8e86c4d0ccb7606b417f;p=ceph.git os/filestore: make sloppy_crc can catch fatal error for read() Signed-off-by: xie xingguo --- diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 110c721f1693..eeefe54759d7 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -2988,7 +2988,7 @@ int FileStore::read( if (m_filestore_sloppy_crc && (!replaying || backend->can_checkpoint())) { ostringstream ss; int errors = backend->_crc_verify_read(**fd, offset, got, bl, &ss); - if (errors > 0) { + if (errors != 0) { dout(0) << "FileStore::read " << cid << "/" << oid << " " << offset << "~" << got << " ... BAD CRC:\n" << ss.str() << dendl; assert(0 == "bad crc on read");