_stop_alloc();
_shutdown_logger();
+ after_mkfs = true;
+
dout(10) << __func__ << " success" << dendl;
return 0;
}
p->discard_drain();
}
- for (auto p : alloc) {
- if (p != nullptr && p != shared_bdev_alloc) {
- }
- }
for (size_t i = 0; i < alloc.size(); ++i) {
if (alloc[i] && alloc[i] != shared_bdev_alloc) {
alloc[i]->shutdown();
for (auto& p : file_map) {
dout(30) << __func__ << " noting alloc for " << p.second->fnode << dendl;
for (auto& q : p.second->fnode.extents) {
- alloc[q.bdev]->init_rm_free(q.offset, q.length);
if (alloc[q.bdev] == shared_bdev_alloc) {
+ if (!after_mkfs) {
+ alloc[q.bdev]->init_rm_free(q.offset, q.length);
+ }
shared_bdev_used += q.length;
+ } else {
+ alloc[q.bdev]->init_rm_free(q.offset, q.length);
}
}
}
<< std::hex << log_writer->pos << std::dec
<< dendl;
+ after_mkfs = false;
+
return 0;
out: