From 3414bcee57c82fde2ea52eae81ea81b6127952c6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 23 Apr 2015 14:21:15 -0700 Subject: [PATCH] os/FileStore: debug omap_get_values returns Signed-off-by: Sage Weil --- src/os/FileStore.cc | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 20950689ebc8..b7389801873e 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -4903,23 +4903,32 @@ int FileStore::omap_get_values(coll_t c, const ghobject_t &hoid, tracepoint(objectstore, omap_get_values_enter, c.c_str()); dout(15) << __func__ << " " << c << "/" << hoid << dendl; Index index; + const char *where = 0; int r = get_index(c, &index); - if (r < 0) - return r; + if (r < 0) { + where = " (get_index)"; + goto out; + } { assert(NULL != index.index); RWLock::RLocker l((index.index)->access_lock); r = lfn_find(hoid, index); - if (r < 0) - return r; + if (r < 0) { + where = " (lfn_find)"; + goto out; + } } r = object_map->get_values(hoid, keys, out); if (r < 0 && r != -ENOENT) { assert(!m_filestore_fail_eio || r != -EIO); - return r; + goto out; } - tracepoint(objectstore, omap_get_values_exit, 0); - return 0; + r = 0; + out: + tracepoint(objectstore, omap_get_values_exit, r); + dout(15) << __func__ << " " << c << "/" << hoid << " = " << r + << where << dendl; + return r; } int FileStore::omap_check_keys(coll_t c, const ghobject_t &hoid, -- 2.47.3