diff options
author | Samuel Just <sam.just@inktank.com> | 2013-09-19 19:51:46 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-09-20 09:30:06 -0700 |
commit | e112a8348ac6d65f01b82cb9803f5faf69b46419 (patch) | |
tree | 2c0dcda47da59d78cdcdec3cb6d917db19596c6c | |
parent | 04de6a839f6a42e50b13dbda9513f0df1de47ee7 (diff) | |
download | ceph-e112a8348ac6d65f01b82cb9803f5faf69b46419.tar.gz |
FileStore: only remove the omap entries if nlink == 1
Fixes: #6359
Introduced in 17c5d765d7c7573f875f6b3ba66e3b6813110a06
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/os/FileStore.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 5d9e9d1482d..ac51f95006f 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 |