From c69a2aace459a4d07f1088b08679bac4a6e43f72 Mon Sep 17 00:00:00 2001 From: Ji Chen Date: Tue, 5 Jan 2016 03:22:10 -0500 Subject: [PATCH] os/FileStore: print error to log on eio 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 --- src/os/filestore/FileStore.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 5cb73e7b01a..a927e441d90 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -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 -- 2.47.3