]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: better debug on unlink
authorSage Weil <sage@redhat.com>
Sun, 7 Dec 2014 17:01:00 +0000 (09:01 -0800)
committerSage Weil <sage@redhat.com>
Wed, 17 Dec 2014 01:07:59 +0000 (17:07 -0800)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/FileStore.cc

index d020c2a256bcabc3aa2331f4d0a5f8ed799fd5b0..2a4de80fdbe1ae17c2a506fab4246a88b68007b4 100644 (file)
@@ -437,8 +437,10 @@ int FileStore::lfn_unlink(coll_t cid, const ghobject_t& o,
 {
   Index index;
   int r = get_index(cid, &index);
-  if (r < 0)
+  if (r < 0) {
+    dout(25) << __func__ << " get_index failed " << cpp_strerror(r) << dendl;
     return r;
+  }
 
   assert(NULL != index.index);
   RWLock::WLocker l((index.index)->access_lock);
@@ -463,6 +465,7 @@ int FileStore::lfn_unlink(coll_t cid, const ghobject_t& o,
        } else {
          assert(!m_filestore_fail_eio || r != -EIO);
        }
+       dout(25) << __func__ << " stat failed " << cpp_strerror(r) << dendl;
        return r;
       } else if (st.st_nlink == 1) {
        force_clear_omap = true;
@@ -473,6 +476,7 @@ int FileStore::lfn_unlink(coll_t cid, const ghobject_t& o,
               << " in cid " << cid << dendl;
       r = object_map->clear(o, &spos);
       if (r < 0 && r != -ENOENT) {
+       dout(25) << __func__ << " omap clear failed " << cpp_strerror(r) << dendl;
        assert(!m_filestore_fail_eio || r != -EIO);
        return r;
       }
@@ -489,7 +493,12 @@ int FileStore::lfn_unlink(coll_t cid, const ghobject_t& o,
        object_map->sync(&o, &spos);
     }
   }
-  return index->unlink(o);
+  r = index->unlink(o);
+  if (r < 0) {
+    dout(25) << __func__ << " index unlink failed " << cpp_strerror(r) << dendl;
+    return r;
+  }
+  return 0;
 }
 
 FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbits_t flags, const char *name, bool do_update) :