From: Samuel Just Date: Fri, 20 Sep 2013 02:51:46 +0000 (-0700) Subject: FileStore: only remove the omap entries if nlink == 1 X-Git-Tag: v0.71~109 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e112a8348ac6d65f01b82cb9803f5faf69b46419;p=ceph.git FileStore: only remove the omap entries if nlink == 1 Fixes: #6359 Introduced in 17c5d765d7c7573f875f6b3ba66e3b6813110a06 Signed-off-by: Samuel Just Reviewed-by: Sage Weil --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 5d9e9d1482dd..ac51f95006fd 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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