Signed-off-by: Samuel Just <sjust@redhat.com>
Cache::~Cache()
{
- retire_extent(root);
- root.reset();
- for (auto i = dirty.begin(); i != dirty.end(); ) {
- auto ptr = &*i;
- dirty.erase(i++);
- intrusive_ptr_release(ptr);
- }
for (auto &i: extents) {
logger().error("~Cache: extent {} still alive", i);
}
Cache::close_ertr::future<> Cache::close()
{
+ retire_extent(root);
+ root.reset();
+ for (auto i = dirty.begin(); i != dirty.end(); ) {
+ auto ptr = &*i;
+ dirty.erase(i++);
+ intrusive_ptr_release(ptr);
+ }
return close_ertr::now();
}
/**
* close
*
- * TODO: currently a noop -- probably should be used to flush dirty blocks
+ * TODO: should flush dirty blocks
*/
using close_ertr = crimson::errorator<
crimson::ct_error::input_output_error>;