]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't maintain bloom filters in standby replay 12133/head
authorJohn Spray <john.spray@redhat.com>
Wed, 23 Nov 2016 14:12:13 +0000 (14:12 +0000)
committerJohn Spray <john.spray@redhat.com>
Wed, 23 Nov 2016 14:17:44 +0000 (14:17 +0000)
...and thereby avoid needing to clear them when
replaying an EExport

Fixes: http://tracker.ceph.com/issues/16924
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/CDir.cc

index acb50fcd96af2dcdcfb8540e4deaf588e4856b56..8e7a7694cc9e4951c580c9aa99a8a724550ad84a 100644 (file)
@@ -635,6 +635,13 @@ void CDir::add_to_bloom(CDentry *dn)
     /* not create bloom filter for incomplete dir that was added by log replay */
     if (!is_complete())
       return;
+
+    /* don't maintain bloom filters in standby replay (saves cycles, and also
+     * avoids need to implement clearing it in EExport for #16924) */
+    if (cache->mds->is_standby_replay()) {
+      return;
+    }
+
     unsigned size = get_num_head_items() + get_num_snap_items();
     if (size < 100) size = 100;
     bloom.reset(new bloom_filter(size, 1.0 / size, 0));