]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: print error to log on eio 7111/head
authorJi Chen <insomnia@139.com>
Tue, 5 Jan 2016 08:22:10 +0000 (03:22 -0500)
committerJi Chen <insomnia@139.com>
Tue, 12 Jan 2016 03:10:46 +0000 (11:10 +0800)
when osd do backfillings, once read one file failed
osd will assert failed, and never up again.
so we need locate this file from log at level-0,
delete it manully,start osd and let backfill go again.

Signed-off-by: Ji Chen <insomnia@139.com>
src/os/filestore/FileStore.cc

index 5cb73e7b01a3291b40ed321a7c0137c966bc192b..a927e441d9093819101dcafdeda298aaf0712bae 100644 (file)
@@ -2959,7 +2959,10 @@ int FileStore::read(
   if (got < 0) {
     dout(10) << "FileStore::read(" << cid << "/" << oid << ") pread error: " << cpp_strerror(got) << dendl;
     lfn_close(fd);
-    assert(allow_eio || !m_filestore_fail_eio || got != -EIO);
+    if (!(allow_eio || !m_filestore_fail_eio || got != -EIO)) {
+      derr << "FileStore::read(" << cid << "/" << oid << ") pread error: " << cpp_strerror(got) << dendl;
+      assert(0 == "eio on pread");
+    }
     return got;
   }
   bptr.set_length(got);   // properly size the buffer