]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: only remove the omap entries if nlink == 1
authorSamuel Just <sam.just@inktank.com>
Fri, 20 Sep 2013 02:51:46 +0000 (19:51 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 20 Sep 2013 16:30:06 +0000 (09:30 -0700)
Fixes: #6359
Introduced in 17c5d765d7c7573f875f6b3ba66e3b6813110a06
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/os/FileStore.cc

index 5d9e9d1482dd02df9bda85cdbf64a032764243f6..ac51f95006fdd38cac45bf4329aa11fc7dbfd17f 100644 (file)
@@ -324,7 +324,8 @@ int FileStore::lfn_unlink(coll_t cid, const hobject_t& o,
        assert(!m_filestore_fail_eio || r != -EIO);
        return r;
       }
-      force_clear_omap = true;
+      if (st.st_nlink == 1)
+       force_clear_omap = true;
     }
     if (force_clear_omap) {
       dout(20) << __func__ << ": clearing omap on " << o