bloom filter can't handle range covered by snap dentry.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
void CDir::add_to_bloom(CDentry *dn)
{
+ assert(dn->last == CEPH_NOSNAP);
if (!bloom) {
/* not create bloom filter for incomplete dir that was added by log replay */
if (!is_complete())
}
// remove dentry
- if (dir->is_auth())
+ if (dn->last == CEPH_NOSNAP && dir->is_auth())
dir->add_to_bloom(dn);
dir->remove_dentry(dn);
if (curdir->is_auth()) {
// dentry is mine.
- if (curdir->is_complete() || (curdir->has_bloom() &&
- !curdir->is_in_bloom(path[depth]))){
+ if (curdir->is_complete() ||
+ (snapid == CEPH_NOSNAP &&
+ curdir->has_bloom() &&
+ !curdir->is_in_bloom(path[depth]))){
// file not found
if (pdnvec) {
// instantiate a null dn?