From 84dd733dd53e12deb35d17eb18e3172bdb84d5dd Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 19 Apr 2016 14:57:43 +0800 Subject: [PATCH] os/filestore: improve error message of aio write failure e.g. when we encountered an AIO error, the output is not very human-readable, as below: -1> 2016-04-19 12:07:57.387805 7f192e320700 -1 journal aio to 53059584~1744896 wrote 18446744073709551611 0> 2016-04-19 12:07:57.389205 7f192e320700 -1 os/FileJournal.cc: In function 'void FileJournal::write_finish_thread_entry()' th read 7f192e320700 time 2016-04-19 12:07:57.387831 Signed-off-by: xie xingguo --- src/os/filestore/FileJournal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/filestore/FileJournal.cc b/src/os/filestore/FileJournal.cc index 9e403101c35..5a77be0fd1f 100644 --- a/src/os/filestore/FileJournal.cc +++ b/src/os/filestore/FileJournal.cc @@ -1537,7 +1537,7 @@ void FileJournal::write_finish_thread_entry() aio_info *ai = (aio_info *)event[i].obj; if (event[i].res != ai->len) { derr << "aio to " << ai->off << "~" << ai->len - << " wrote " << event[i].res << dendl; + << " returned: " << (int)event[i].res << dendl; assert(0 == "unexpected aio error"); } dout(10) << "write_finish_thread_entry aio " << ai->off -- 2.47.3