From: John Spray Date: Wed, 23 Nov 2016 14:12:13 +0000 (+0000) Subject: mds: don't maintain bloom filters in standby replay X-Git-Tag: v11.1.0~38^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5ad7c44e3c252ee1a908285f3264bd2c1747203d;p=ceph.git mds: don't maintain bloom filters in standby replay ...and thereby avoid needing to clear them when replaying an EExport Fixes: http://tracker.ceph.com/issues/16924 Signed-off-by: John Spray --- diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index acb50fcd96af2..8e7a7694cc9e4 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -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));