]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix fnode.snap_purged_thru check
authorYan, Zheng <zyan@redhat.com>
Wed, 18 Mar 2015 06:12:50 +0000 (14:12 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 18 Mar 2015 06:12:50 +0000 (14:12 +0800)
commit7ae66c495edeaa1d598520fdc51c581131154d9e
tree8a3df4887bfa8604a95f70aabbf0d8a117dd7356
parent635d79251540aaecea40b40e9ba8bd7f8d3e4731
mds: fix fnode.snap_purged_thru check

We do not alway succeed in purging all stale snap dentries
(stale snap dentris can be in-use or have been trimmed from
cache). Updating fnode.snap_purged_thru prematurely will make
us not purge the remainning stale snap dentries. If CDir
has no cached snap dentry when fetching dirfrag, we can
guaranee that all stale snap dentries will be purged.
So we only update fnode.snap_purged_thru in this case.

Now the code that purges stale snap dentries is executed more
frequently. So this patch also make readdir not purge stale
snap dentries

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CDir.cc
src/mds/Server.cc