]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os: FileStore::lfn_unlink always clears FDCache 2505/head
authorLoic Dachary <loic-201408@dachary.org>
Wed, 3 Sep 2014 12:19:40 +0000 (14:19 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Tue, 16 Sep 2014 08:28:46 +0000 (10:28 +0200)
commit45731dbca780d783bebe5bec485fe753da32639e
treeb36c946dd33cf306b00473977e683732f5f2c989
parent0ffc5ee53c34aabbba016c6e1d6b7a91c3124ea1
os: FileStore::lfn_unlink always clears FDCache

Otherwise the FDCache will keep a file descriptor to a file that was
removed from the file system. This may create various type of errors
because the OSD checking the FDCache will assume the file that contains
information for an object exists although it does not. For instance in
the following:

      * rados put object file
      * rm file from the primary
      * repair the pg to which the object is mapped

if the FDCache is not cleared, repair will incorrectly pull a copy from
a replica and write it to the now unlinked file. Later on, it will
assume the file exists on the primary and only be partially correct :
the data can still be accessed via the file descriptor but any operation
using the path name will fail.

http://tracker.ceph.com/issues/8914 Fixes: #8914

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/common/shared_cache.hpp
src/os/FDCache.h
src/os/FileStore.cc
src/test/osd/osd-scrub-repair.sh [new file with mode: 0755]