]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: make sloppy_crc can catch fatal error for read()
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 25 Feb 2016 07:04:56 +0000 (07:04 +0000)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 15 Mar 2016 13:56:56 +0000 (21:56 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/filestore/FileStore.cc

index 110c721f16939ab479fcb8e44becedf07200f4a8..eeefe54759d7f61575cc29fe7aacbab5f853c024 100644 (file)
@@ -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");