Otherwise cache items survive beyond umount into the next mount cycle!
Also, ensure that we flush_cache *before* clearing coll_map, as some cache
items have references back to the Collection.
Signed-off-by: Sage Weil <sage@redhat.com>
f->stop();
}
out_coll:
+ flush_cache();
coll_map.clear();
out_alloc:
_close_alloc();
f->stop();
}
_reap_collections();
+ flush_cache();
coll_map.clear();
dout(20) << __func__ << " closing" << dendl;
}
r = bluefs->fsck();
if (r < 0) {
+ flush_cache();
coll_map.clear();
goto out_alloc;
}
}
out_scan:
+ flush_cache();
coll_map.clear();
out_alloc:
_close_alloc();
void BlueStore::flush_cache()
{
+ dout(10) << __func__ << dendl;
for (auto i : cache_shards) {
i->trim_all();
}