From c49ba750a74321f67a38f89357989e4bc9fe5f9b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 16 May 2013 15:28:17 -0700 Subject: [PATCH] os/FileStore: print error code to log on replay guard failure Signed-off-by: Sage Weil --- src/os/FileStore.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 57a84ab8dcbbb..e29f51ae4f9bd 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -2221,7 +2221,8 @@ void FileStore::_close_replay_guard(coll_t cid, get_cdir(cid, fn, sizeof(fn)); int fd = ::open(fn, O_RDONLY); if (fd < 0) { - derr << "_set_replay_guard " << cid << " error " << fd << dendl; + int err = errno; + derr << "_set_replay_guard " << cid << " error " << cpp_strerror(err) << dendl; assert(0 == "_close_replay_guard failed"); } _close_replay_guard(fd, spos); -- 2.39.5