]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: clear cached fd for renamed-over object
authorSage Weil <sage@redhat.com>
Tue, 31 Mar 2015 22:31:02 +0000 (15:31 -0700)
committerSage Weil <sage@redhat.com>
Wed, 19 Aug 2015 21:03:52 +0000 (17:03 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/FileStore.cc

index 57997d291dbd7644475b9d1cc31c1527d3f9f2d8..57bfaf32490e2f016e1a7a2842fbbec98f2ac3c8 100644 (file)
@@ -426,6 +426,9 @@ int FileStore::lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghob
     if (r < 0)
       return -errno;
 
+    // make sure old fd for unlinked/overwritten file is gone
+    fdcache.clear(newoid);
+
     r = index_new->created(newoid, path_new->path());
     if (r < 0) {
       assert(!m_filestore_fail_eio || r != -EIO);